fix(release): configure release workflow for npm publishing

- 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 <noreply@anthropic.com>
This commit is contained in:
Sebastian Krüger
2025-11-13 09:47:13 +01:00
parent 89228842fc
commit 5a9de8e195
2 changed files with 16 additions and 32 deletions

View File

@@ -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"
}
}
}
}
}

View File

@@ -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