chore: generate provenance statements for npm package (#10477)

* chore: generate provenance statements for npm package

See also https://docs.npmjs.com/generating-provenance-statements#example-github-actions-workflow

* also add --provenance for covector publishes

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
This commit is contained in:
rwv 2024-08-11 02:48:04 +08:00 committed by GitHub
parent a975cd7976
commit 008b9f7481
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -113,8 +113,8 @@
"pipe": true "pipe": true
}, },
{ {
"command": "yarn publish --access public --loglevel silly --tag next", "command": "yarn publish --access public --loglevel silly --tag next --provenance",
"dryRunCommand": "npm publish --dry-run --access public", "dryRunCommand": "npm publish --dry-run --access public --provenance",
"pipe": true "pipe": true
}, },
{ {

View File

@ -390,7 +390,7 @@ jobs:
- name: Publish - name: Publish
run: | run: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
npm publish --tag next npm publish --tag next --provenance
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.ORG_NPM_TOKEN }} NPM_TOKEN: ${{ secrets.ORG_NPM_TOKEN }}