Skip to content

Commit

Permalink
ci(github): publish package to npm registry with provenance
Browse files Browse the repository at this point in the history
  • Loading branch information
remarkablemark committed Oct 6, 2024
1 parent ccd891d commit 04332b6
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ on:
branches:
- master

permissions:
contents: write
pull-requests: write

jobs:
release-please:
runs-on: ubuntu-latest
Expand All @@ -16,29 +12,33 @@ jobs:

steps:
- name: Release Please
uses: google-github-actions/release-please-action@v4
uses: googleapis/release-please-action@v4
id: release
with:
release-type: node

publish:
needs: release-please
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
needs: release-please
if: ${{ needs.release-please.outputs.release_created }}

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
registry-url: 'https://registry.npmjs.org'
node-version-file: .nvmrc
registry-url: https://registry.npmjs.org

- name: Install dependencies
run: npm ci
run: npm ci --prefer-offline

- name: Publish
run: npm publish
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 04332b6

Please sign in to comment.