Skip to content
This repository was archived by the owner on Aug 26, 2025. It is now read-only.

Commit d795db4

Browse files
committed
Publish release tags to npm with provenance.
1 parent 7c2bd0e commit d795db4

1 file changed

Lines changed: 29 additions & 1 deletion

File tree

.github/workflows/github-release.yml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- v*
77

88
jobs:
9-
Publish:
9+
create-github-release:
1010
permissions:
1111
contents: write
1212
runs-on: ubuntu-latest
@@ -26,3 +26,31 @@ jobs:
2626
release_name: ${{ env.RELEASE_NAME }}
2727
draft: false
2828
prerelease: false
29+
publish-npm-release:
30+
runs-on: ubuntu-latest
31+
permissions:
32+
contents: read
33+
id-token: write
34+
steps:
35+
- uses: actions/checkout@v3
36+
- uses: actions/setup-node@v3
37+
with:
38+
node-version: '19.x'
39+
registry-url: 'https://registry.npmjs.org'
40+
- name: Clone npm
41+
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
42+
with:
43+
repository: npm/cli
44+
ref: provenance
45+
path: npm
46+
- name: Link npm
47+
run: |
48+
cd npm
49+
node . link
50+
cd ..
51+
npm version
52+
- run: npm ci
53+
- run: make build
54+
- run: npm publish --provenance --access public
55+
env:
56+
NPM_TOKEN: ${{ secrets.NPM_WEBAUTHN_JSON_PUBLISH_TOKEN }}

0 commit comments

Comments
 (0)