Skip to content

Commit bbbfe26

Browse files
authored
Use npm trusted publishing (OIDC) instead of NPM_TOKEN (#586)
Removes dependency on long-lived npm tokens that expire every 90 days.
1 parent 2984202 commit bbbfe26

1 file changed

Lines changed: 13 additions & 5 deletions

File tree

.github/workflows/npm-publish.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,16 @@ on:
66

77
jobs:
88
publish-npm:
9-
uses: cabify/javascript-actions/.github/workflows/npm_publish.yml@main
10-
with:
11-
tag: ${{ contains(github.ref_name,'beta') && 'beta' || 'latest' }}
12-
secrets:
13-
token: ${{ secrets.NPM_TOKEN }}
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
id-token: write
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: 24
18+
registry-url: https://registry.npmjs.org
19+
- run: yarn install
20+
- run: yarn build
21+
- run: npm publish --provenance --tag ${{ contains(github.ref_name,'beta') && 'beta' || 'latest' }}

0 commit comments

Comments
 (0)