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 5, 2024
1 parent 4431910 commit de0f0be
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +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
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:
- 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 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 de0f0be

Please sign in to comment.