Skip to content

Commit 9d31f34

Browse files
committed
chore: add npm publish workflow with OIDC support
1 parent 6902fd6 commit 9d31f34

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Publish to NPM
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
id-token: write
13+
steps:
14+
- uses: actions/checkout@v6
15+
16+
- uses: actions/setup-node@v6
17+
with:
18+
node-version-file: '.nvmrc'
19+
registry-url: 'https://registry.npmjs.org'
20+
21+
- name: Upgrade npm for OIDC support
22+
run: npm install -g npm@latest
23+
24+
- run: yarn install --immutable
25+
26+
- run: yarn prepare
27+
28+
- run: npm publish --provenance --access public ${{ github.event.release.prerelease && '--tag next' || ''}}

0 commit comments

Comments
 (0)