Skip to content

Commit 9cccef5

Browse files
AxGordclaude
andcommitted
ci: fix OIDC publish — drop registry-url placeholder token, release after publish
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent ca0b0e9 commit 9cccef5

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

.github/workflows/publish.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- uses: actions/setup-node@v4
2323
with:
2424
node-version: '24'
25-
registry-url: 'https://registry.npmjs.org'
25+
# no registry-url: it injects a placeholder NODE_AUTH_TOKEN that blocks OIDC trusted publishing
2626
# Trusted publishing (OIDC) needs npm >= 11.5.1
2727
- run: npm install -g npm@latest
2828

@@ -61,14 +61,15 @@ jobs:
6161
npm run build
6262
npm test
6363
64+
- name: Publish to npm
65+
if: steps.version.outputs.changed == 'true'
66+
run: npm publish --provenance --access public
67+
68+
# After publish: a failed publish must not leave a tag behind (the version-bump check would skip forever)
6469
- name: Create GitHub Release
6570
if: steps.version.outputs.changed == 'true'
6671
uses: softprops/action-gh-release@v2
6772
with:
6873
tag_name: v${{ steps.version.outputs.version }}
6974
name: v${{ steps.version.outputs.version }}
7075
body: ${{ steps.changelog.outputs.body }}
71-
72-
- name: Publish to npm
73-
if: steps.version.outputs.changed == 'true'
74-
run: npm publish --provenance --access public

0 commit comments

Comments
 (0)