Skip to content

Commit 2bc12b0

Browse files
Fix RC publish by merging into single workflow (#56)
The separate publish-rc.yml workflow failed because npm OIDC provenance auth includes the workflow file path in token claims. Only publish.yml was authorized. Consolidate both workflows into publish.yml with RC detection. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d345301 commit 2bc12b0

File tree

2 files changed

+14
-57
lines changed

2 files changed

+14
-57
lines changed

.github/workflows/publish-rc.yml

Lines changed: 0 additions & 55 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
push:
55
tags:
66
- "v*"
7-
- "!v*-rc.*"
87

98
jobs:
109
release:
@@ -17,6 +16,18 @@ jobs:
1716
- name: Checkout
1817
uses: actions/checkout@v6
1918

19+
- name: Detect release type
20+
id: meta
21+
run: |
22+
TAG="${GITHUB_REF_NAME}"
23+
if [[ "$TAG" == *"-rc."* ]]; then
24+
echo "prerelease=true" >> "$GITHUB_OUTPUT"
25+
echo "npm_tag=rc" >> "$GITHUB_OUTPUT"
26+
else
27+
echo "prerelease=false" >> "$GITHUB_OUTPUT"
28+
echo "npm_tag=latest" >> "$GITHUB_OUTPUT"
29+
fi
30+
2031
- name: Setup Node
2132
uses: actions/setup-node@v4
2233
with:
@@ -47,9 +58,10 @@ jobs:
4758
release/agent-slack-*
4859
release/checksums-sha256.txt
4960
generate_release_notes: true
61+
prerelease: ${{ steps.meta.outputs.prerelease == 'true' }}
5062

5163
- name: Build for npm
5264
run: bun run build:npm
5365

5466
- name: Publish to npm
55-
run: npm publish --provenance --access public
67+
run: npm publish --provenance --access public --tag ${{ steps.meta.outputs.npm_tag }}

0 commit comments

Comments
 (0)