Skip to content

Commit

Permalink
Publish packages to NPM with provenance
Browse files Browse the repository at this point in the history
  • Loading branch information
axelboc committed Oct 30, 2023
1 parent 4917b6b commit 6941516
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/publish-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
jobs:
publish:
runs-on: ubuntu-latest
permissions:
id-token: write # https://docs.npmjs.com/generating-provenance-statements#publishing-packages-with-provenance-via-github-actions

steps:
- name: Checkout 🏷️
uses: actions/checkout@v3
Expand Down Expand Up @@ -64,19 +67,19 @@ jobs:
package: 'packages/h5wasm'

- name: Publish @h5web/lib 🥳
run: cd packages/lib && pnpm publish --access public --no-git-checks --tag $NPM_TAG
run: cd packages/lib && pnpm publish --access public --provenance --no-git-checks --tag $NPM_TAG
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TAG: "${{ contains(steps.packageVersion.outputs.PACKAGE_VERSION, 'beta') && 'next' || 'latest' }}"

- name: Publish @h5web/app 🥳
run: cd packages/app && pnpm publish --access public --no-git-checks --tag $NPM_TAG
run: cd packages/app && pnpm publish --access public --provenance --no-git-checks --tag $NPM_TAG
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TAG: "${{ contains(steps.packageVersion.outputs.PACKAGE_VERSION, 'beta') && 'next' || 'latest' }}"

- name: Publish @h5web/h5wasm 🥳
run: cd packages/h5wasm && pnpm publish --access public --no-git-checks --tag $NPM_TAG
run: cd packages/h5wasm && pnpm publish --access public --provenance --no-git-checks --tag $NPM_TAG
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TAG: "${{ contains(steps.packageVersion.outputs.PACKAGE_VERSION, 'beta') && 'next' || 'latest' }}"

0 comments on commit 6941516

Please sign in to comment.