Skip to content

Commit

Permalink
fix: npm publish provenance permissions (#48757)
Browse files Browse the repository at this point in the history
Co-authored-by: Jiachi Liu <inbox@huozhi.im>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
3 people committed Apr 24, 2023
1 parent 8460373 commit b3afc46
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build_test_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -966,6 +966,9 @@ jobs:
- build
- build-wasm
- build-native
permissions:
contents: write
id-token: write
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN_ELEVATED }}
steps:
Expand Down Expand Up @@ -997,6 +1000,7 @@ jobs:
name: wasm-binaries
path: packages/next-swc/crates/wasm

- run: npm i -g npm@9 # need latest version for provenance
- run: npm i -g pnpm@${PNPM_VERSION}
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
- run: ./scripts/publish-native.js
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
provenance = true
save-exact = true
tag-version-prefix=""
strict-peer-dependencies = false
Expand Down

0 comments on commit b3afc46

Please sign in to comment.