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 29, 2024
1 parent e608803 commit cbdcb02
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 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 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 cbdcb02

Please sign in to comment.