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:
28
.github/dotslash-config.json
vendored
28
.github/dotslash-config.json
vendored
@@ -27,34 +27,6 @@
|
|||||||
"path": "llmx.exe"
|
"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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
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 }}" \
|
--release-version "${{ steps.release_name.outputs.name }}" \
|
||||||
--package llmx
|
--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
|
- name: Create GitHub Release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
@@ -480,9 +492,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: 22
|
node-version: 22
|
||||||
registry-url: "https://registry.npmjs.org"
|
registry-url: "https://registry.npmjs.org"
|
||||||
scope: "@valknarthing"
|
|
||||||
env:
|
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
||||||
|
|
||||||
- name: Download npm tarballs from release
|
- name: Download npm tarballs from release
|
||||||
env:
|
env:
|
||||||
@@ -499,10 +508,13 @@ jobs:
|
|||||||
|
|
||||||
- name: Publish to npm
|
- name: Publish to npm
|
||||||
env:
|
env:
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
||||||
VERSION: ${{ needs.release.outputs.version }}
|
VERSION: ${{ needs.release.outputs.version }}
|
||||||
NPM_TAG: ${{ needs.release.outputs.npm_tag }}
|
NPM_TAG: ${{ needs.release.outputs.npm_tag }}
|
||||||
run: |
|
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
|
set -euo pipefail
|
||||||
tag_args=()
|
tag_args=()
|
||||||
if [[ -n "${NPM_TAG}" ]]; then
|
if [[ -n "${NPM_TAG}" ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user