Skip to content

Commit 6c6f3f0

Browse files
committedOct 18, 2023
Add support for npm provenance
1 parent 5ebb44d commit 6c6f3f0

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed
 

‎.github/workflows/publish.yml

+8-4
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,27 @@ 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
working-directory: packages/react-clock
4751
env:
48-
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
52+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4953

5054
- name: Publish with next tag
5155
if: github.event.release.prelease == true
52-
run: yarn npm publish --tag next
56+
run: npm publish package.tgz --tag next --provenance
5357
working-directory: packages/react-clock
5458
env:
55-
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
59+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)
Please sign in to comment.