From 5a9de8e195219896d2ff6cf8039b93c6dc2dbad7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Thu, 13 Nov 2025 09:47:13 +0100 Subject: [PATCH] fix(release): configure release workflow for npm publishing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Delete existing release before creating new one to avoid conflicts - Remove llmx-responses-api-proxy from dotslash config (not needed) - Add 'Create GitHub Release' step to upload platform binaries - Configure npm authentication by writing token to setup-node's .npmrc - Use internal package identifier 'llmx' in workflow scripts This fixes the release workflow to properly: 1. Clean up previous failed releases 2. Create GitHub release with all platform binaries 3. Add DotSlash manifest file (llmx) without conflicts 4. Publish to npm as @valknarthing/llmx with proper authentication 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/dotslash-config.json | 28 ---------------------------- .github/workflows/rust-release.yml | 20 ++++++++++++++++---- 2 files changed, 16 insertions(+), 32 deletions(-) diff --git a/.github/dotslash-config.json b/.github/dotslash-config.json index fe9cef2c..907cd682 100644 --- a/.github/dotslash-config.json +++ b/.github/dotslash-config.json @@ -27,34 +27,6 @@ "path": "llmx.exe" } } - }, - "llmx-responses-api-proxy": { - "platforms": { - "macos-aarch64": { - "regex": "^llmx-responses-api-proxy-aarch64-apple-darwin\\.zst$", - "path": "llmx-responses-api-proxy" - }, - "macos-x86_64": { - "regex": "^llmx-responses-api-proxy-x86_64-apple-darwin\\.zst$", - "path": "llmx-responses-api-proxy" - }, - "linux-x86_64": { - "regex": "^llmx-responses-api-proxy-x86_64-unknown-linux-musl\\.zst$", - "path": "llmx-responses-api-proxy" - }, - "linux-aarch64": { - "regex": "^llmx-responses-api-proxy-aarch64-unknown-linux-musl\\.zst$", - "path": "llmx-responses-api-proxy" - }, - "windows-x86_64": { - "regex": "^llmx-responses-api-proxy-x86_64-pc-windows-msvc\\.exe\\.zst$", - "path": "llmx-responses-api-proxy.exe" - }, - "windows-aarch64": { - "regex": "^llmx-responses-api-proxy-aarch64-pc-windows-msvc\\.exe\\.zst$", - "path": "llmx-responses-api-proxy.exe" - } - } } } } diff --git a/.github/workflows/rust-release.yml b/.github/workflows/rust-release.yml index 52ae15a1..2d8c0650 100644 --- a/.github/workflows/rust-release.yml +++ b/.github/workflows/rust-release.yml @@ -447,6 +447,18 @@ jobs: --release-version "${{ steps.release_name.outputs.name }}" \ --package llmx + # Delete any existing release to avoid conflicts with dotslash manifest file + - name: Delete existing release if present + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + if gh release view "${{ github.ref_name }}" --repo "${{ github.repository }}" >/dev/null 2>&1; then + echo "Deleting existing release ${{ github.ref_name }}" + gh release delete "${{ github.ref_name }}" --repo "${{ github.repository }}" --yes + else + echo "No existing release found for ${{ github.ref_name }}" + fi + - name: Create GitHub Release uses: softprops/action-gh-release@v2 with: @@ -480,9 +492,6 @@ jobs: with: node-version: 22 registry-url: "https://registry.npmjs.org" - scope: "@valknarthing" - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Download npm tarballs from release env: @@ -499,10 +508,13 @@ jobs: - name: Publish to npm env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} VERSION: ${{ needs.release.outputs.version }} NPM_TAG: ${{ needs.release.outputs.npm_tag }} run: | + # Write auth token to the .npmrc file that setup-node created + echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ${NPM_CONFIG_USERCONFIG} + + set -euo pipefail tag_args=() if [[ -n "${NPM_TAG}" ]]; then