Skip to content

Commit

Permalink
NPM Provenance
Browse files Browse the repository at this point in the history
  • Loading branch information
willemliufdmg committed Apr 21, 2023
1 parent cf7b0cf commit f2c4cd0
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ env:

jobs:
build:
permissions:
id-token: write
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -35,13 +37,13 @@ jobs:
run: npm run build --if-present
- name: Publish NPMJS @fdmg
if: contains(github.ref, 'canary') == false
run: npm publish ./dist
run: npm publish --provenance ./dist
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
continue-on-error: true
- name: Publish NPMJS @fdmg (canary)
if: contains(github.ref, 'canary')
run: npm publish ./dist --tag next
run: npm publish --provenance ./dist --tag next
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
continue-on-error: true
Expand All @@ -50,13 +52,13 @@ jobs:
run: cp ./dist/package.github.json ./dist/package.json
- name: Publish NPMJS @fdmediagroep
if: contains(github.ref, 'canary') == false
run: npm publish ./dist
run: npm publish --provenance ./dist
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
continue-on-error: true
- name: Publish NPMJS @fdmediagroep (canary)
if: contains(github.ref, 'canary')
run: npm publish ./dist --tag next
run: npm publish --provenance ./dist --tag next
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
continue-on-error: true
Expand All @@ -70,13 +72,13 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish GPR
if: contains(github.ref, 'canary') == false
run: npm publish ./dist
run: npm publish --provenance ./dist
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true
- name: Publish GPR (canary)
if: contains(github.ref, 'canary')
run: npm publish ./dist --tag next
run: npm publish --provenance ./dist --tag next
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true
Expand Down

0 comments on commit f2c4cd0

Please sign in to comment.