Skip to content

Commit 2e9f190

Browse files
committed
fix(release): use OIDC Trusted Publish for npmjs.org
1 parent 45e7deb commit 2e9f190

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/publish.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
jobs:
2+
release:
3+
runs-on: ubuntu-latest
4+
permissions:
5+
contents: write # For git operations
6+
id-token: write # < REQUIRED FOR OIDC
7+
8+
steps:
9+
- uses: actions/checkout
10+
- uses: actions/setup-node
11+
with:
12+
node-version: "lts/*"
13+
registry-url: "https://registry.npmjs.org"
14+
15+
# OIDC requires npm v11.5.1 or later
16+
# Node.js v20 comes with v10.8, so we need to update it:
17+
- run: yarn release-it --ci
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.MIKE_HARDY_RELEASE_GITHUB_TOKEN }}

0 commit comments

Comments
 (0)