Skip to content

Commit 07e5c5a

Browse files
committed
Add support for npm provenance
1 parent 87e9786 commit 07e5c5a

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/publish.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,25 @@ jobs:
3333
uses: actions/setup-node@v3
3434
with:
3535
node-version: '20'
36+
registry-url: 'https://registry.npmjs.org'
3637

3738
- name: Enable Corepack
3839
run: corepack enable
3940

4041
- name: Install dependencies
4142
run: yarn --immutable
4243

44+
- name: Generate archive
45+
run: yarn pack
46+
4347
- name: Publish with latest tag
4448
if: github.event.release.prelease == false
45-
run: yarn npm publish --tag latest
49+
run: npm publish package.tgz --tag latest --provenance
4650
env:
47-
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
51+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4852

4953
- name: Publish with next tag
5054
if: github.event.release.prelease == true
51-
run: yarn npm publish --tag next
55+
run: npm publish package.tgz --tag next --provenance
5256
env:
53-
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
57+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)