Skip to content

Commit f682b23

Browse files
sserrataclaude
andcommitted
ci: migrate canary release to npm trusted publishing (OIDC)
Replace NPM_AUTH_TOKEN secret with OIDC-based trusted publishing, matching the pattern already used in release.yaml: - Add id-token: write permission - Add registry-url to setup-node (configures .npmrc for OIDC) - Remove manual .npmrc token injection and NPM_AUTH_TOKEN secret Requires trusted publisher entries on npmjs.com for canary-release.yml for both docusaurus-plugin-openapi-docs and docusaurus-theme-openapi-docs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 7fd9ecc commit f682b23

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

.github/workflows/canary-release.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99

1010
permissions:
1111
contents: read
12+
id-token: write
1213

1314
jobs:
1415
publish-canary:
@@ -24,20 +25,16 @@ jobs:
2425
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4
2526
with:
2627
node-version: "22"
28+
registry-url: "https://registry.npmjs.org"
2729
cache: yarn
2830
- name: Prepare git
2931
run: |
3032
git config --global user.name "github-actions[bot]"
3133
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
3234
git fetch
3335
git checkout main
34-
echo "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}" >> .npmrc
35-
env:
36-
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
3736
- name: Installation
3837
run: yarn && yarn build-packages
3938
- name: Publish Canary release
4039
run: |
4140
yarn canary
42-
env:
43-
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

0 commit comments

Comments
 (0)