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:
20
.github/workflows/rust-release.yml
vendored
20
.github/workflows/rust-release.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user