Skip to content

Commit

Permalink
ci: configure npm provenance for package publishing (#275)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii-bodnar committed Jun 22, 2023
1 parent cc77633 commit c93228b
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,27 @@ on:
jobs:
publish-npm:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
registry-url: https://registry.npmjs.org/

- name: Install dependencies, build and publish
- name: Install the latest version of the npm CLI
run: npm install -g npm@latest

- name: Install dependencies and build
run: |
npm ci
npm run build
npm publish
- name: Publish the package
run: |
npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit c93228b

Please sign in to comment.