Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Setup npm provenance statements #5406

Merged
merged 3 commits into from
Apr 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,8 @@ jobs:
needs: [config, test_unit]
if: needs.config.outputs.tag || needs.config.outputs.isMainBranch == 'true'
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v3

Expand Down
4 changes: 2 additions & 2 deletions scripts/publish-npm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if [[ $(node ./scripts/check-already-published.js) = "not published" ]]; then
# see https://docs.npmjs.com/private-modules/ci-server-config
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> .npmrc
if [[ -z "$TAG" ]]; then
npm publish --tag canary
npm publish --provenance --tag canary
echo "Published canary."
curl https://purge.jsdelivr.net/npm/hls.js@canary
curl https://purge.jsdelivr.net/npm/hls.js@canary/dist/hls-demo.js
Expand All @@ -19,7 +19,7 @@ if [[ $(node ./scripts/check-already-published.js) = "not published" ]]; then
exit 1
fi
echo "Publishing tag: ${tag}"
npm publish --tag "${tag}"
npm publish --provenance --tag "${tag}"
curl "https://purge.jsdelivr.net/npm/hls.js@${tag}"
echo "Published."
fi
Expand Down