File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111 contents : write
1212 issues : write
1313 pull-requests : write
14+ id-token : write
1415 steps :
1516 - uses : actions/checkout@v4
1617 with :
@@ -24,17 +25,17 @@ jobs:
2425 registry-url : https://registry.npmjs.org/
2526 scope : " @smakss"
2627 cache : pnpm
28+ - name : Ensure npm CLI supports OIDC
29+ run : npm install -g npm@11.5.1
2730 - run : pnpm install --frozen-lockfile
2831 - run : pnpm build
2932 - name : Release (master)
3033 if : github.ref_name == 'master'
3134 run : pnpm release
3235 env :
3336 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
34- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
3537 - name : Release (develop)
3638 if : github.ref_name == 'develop'
3739 run : pnpm release
3840 env :
3941 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
40- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change @@ -47,9 +47,10 @@ Releases are automated with semantic-release on every push to the `master` and
4747- Do not manually bump versions or edit a changelog; releases are published on
4848 GitHub without committing files back to the repo.
4949- Follow Conventional Commits so the release type can be inferred.
50- - The GitHub Actions workflow requires these secrets:
51- - ` NPM_TOKEN ` (publish to npm)
52- - ` GITHUB_TOKEN ` (create GitHub release)
50+ - Releases use npm trusted publishing (OIDC). Configure the repository as a
51+ trusted publisher in npm (using this workflow file) and ensure the workflow
52+ has ` id-token: write ` and npm CLI >= 11.5.1.
53+ - ` GITHUB_TOKEN ` is used to create GitHub releases.
5354
5455To run a local dry run:
5556
You can’t perform that action at this time.
0 commit comments