File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments