File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515 runs-on : ubuntu-latest
1616 permissions :
1717 contents : write
18- id-token : write
1918
2019 steps :
2120 - name : Resolve tag to publish
7170 echo "already_published=false" >> "$GITHUB_OUTPUT"
7271 fi
7372
74- - run : npm publish --provenance -- access public
73+ - run : npm publish --access public
7574 if : steps.npm_state.outputs.already_published != 'true'
75+ env :
76+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
7677
7778 - name : Ensure GitHub Release exists
7879 env :
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ Use this checklist to cut a new npm release for `@aredotna/cli`.
55Publishing is automated by GitHub Actions when a PR with a release label is merged to ` main ` .
66Use exactly one label on the PR: ` major ` , ` minor ` , or ` patch ` .
77The ` Release ` workflow bumps the version and pushes the release commit and tag.
8- That tag then triggers the ` Publish ` workflow, which publishes to npm with trusted publishing (OIDC) and creates the GitHub Release.
8+ That tag then triggers the ` Publish ` workflow, which publishes to npm using the ` NPM_TOKEN ` GitHub secret and creates the GitHub Release.
99
1010## 1) Preflight
1111
@@ -75,7 +75,7 @@ arena whoami --json
7575
7676## Troubleshooting
7777
78- - Publish job fails with OIDC/trusted publishing error: verify trusted publisher settings on npm exactly match ` aredotna/cli ` and workflow file ` publish.yml ` .
78+ - Publish job fails with npm auth error (401/404) : verify the ` NPM_TOKEN ` repository secret exists and has permission to publish ` @aredotna/cli ` .
7979- Workflow skips publishing: merged PR did not contain one of ` major ` , ` minor ` , or ` patch ` labels.
8080- Workflow fails with multiple release labels: keep exactly one of ` major|minor|patch ` on the PR.
8181- Release job says ` main ` advanced after the PR merged: re-run the ` Release ` workflow manually after reviewing current ` main ` .
You can’t perform that action at this time.
0 commit comments