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 Aug 27, 2024
1 parent 3e63a57 commit 7441aa0
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@ 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
id: release

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:
Expand All @@ -29,12 +32,13 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
registry-url: https://registry.npmjs.org

- name: Install dependencies
run: npm install
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 7441aa0

Please sign in to comment.