Skip to content

Commit b734913

Browse files
update publish action
1 parent ba2d72b commit b734913

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

.github/workflows/publish.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,25 @@ on:
44
release:
55
types: [published]
66

7+
permissions:
8+
id-token: write # Required for OIDC
9+
contents: read
10+
711
jobs:
812
build:
913
runs-on: ubuntu-latest
1014
permissions:
1115
contents: read
1216
id-token: write
1317
steps:
14-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@v5
1519
- uses: actions/setup-node@v4
1620
with:
1721
node-version: '20.x'
1822
registry-url: 'https://registry.npmjs.org'
23+
- name: Update npm
24+
run: npm install -g npm@latest
1925
- run: npm ci
20-
- run: npm run build
26+
- run: npm run build --if-present
2127
- run: npm test
22-
- run: npm publish --provenance --access public
23-
env:
24-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
28+
- run: npm publish --provenance --access public

0 commit comments

Comments
 (0)