Skip to content

Commit e8839e1

Browse files
authored
chore: setup release.yml for OIDC publishing (#140)
closes #131
1 parent 54167a4 commit e8839e1

File tree

1 file changed

+11
-18
lines changed

1 file changed

+11
-18
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,21 @@ on:
77
release:
88
types: [created]
99

10-
jobs:
11-
build:
12-
runs-on: ubuntu-latest
13-
steps:
14-
- uses: actions/checkout@v4
15-
- uses: actions/setup-node@v4
16-
with:
17-
node-version: 20
18-
- run: npm install --ignore-scripts --no-audit --no-fund
19-
- run: npm test
10+
permissions:
11+
id-token: write # Required for OIDC
12+
contents: read
2013

14+
jobs:
2115
publish-npm:
22-
needs: build
2316
runs-on: ubuntu-latest
2417
steps:
25-
- uses: actions/checkout@v4
26-
- uses: actions/setup-node@v4
18+
- uses: actions/checkout@v5
19+
- uses: actions/setup-node@v5
2720
with:
28-
cache: "npm"
21+
node-version: 22
2922
registry-url: https://registry.npmjs.org/
30-
- run: npm install --ignore-scripts --no-audit --no-fund
23+
- run: npm install -g npm@latest
24+
- run: npm ci --ignore-scripts --no-fund --no-audit
25+
- run: npm test
3126
- run: npm run build
32-
- run: npm publish
33-
env:
34-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
27+
- run: npm publish --access public

0 commit comments

Comments
 (0)