Skip to content

Commit

Permalink
feat(ci): publish package with provenance
Browse files Browse the repository at this point in the history
  • Loading branch information
Candinya committed Dec 20, 2024
1 parent bc22fd5 commit b0d9d93
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/auto-release.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:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4

Expand All @@ -28,13 +31,13 @@ jobs:

- name: Publish stable release version (with default latest tag)
if: ${{ ! contains(github.ref_name, '-') }}
run: npm publish
run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_CANDINYA }}

- name: Publish unstable pre-release version (with next tag)
if: ${{ contains(github.ref_name, '-') }} # Refer to Semantic Versioning , use a hyphen to split version code and pre-release identifier
run: npm publish --tag next
run: npm publish --provenance --tag next
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_CANDINYA }}

Expand Down

0 comments on commit b0d9d93

Please sign in to comment.