Skip to content

Commit

Permalink
Add npm publishing provenance
Browse files Browse the repository at this point in the history
  • Loading branch information
emmatown committed Nov 29, 2024
1 parent 6fe0372 commit c50dcf1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name: Publish
on:
workflow_dispatch:

permissions:
contents: write
id-token: write

jobs:
publish:
name: Publish
Expand All @@ -27,5 +31,6 @@ jobs:
run: pnpm changeset publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true

- run: git push origin --follow-tags
5 changes: 5 additions & 0 deletions .github/workflows/publish_snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
description: 'The npm tag to publish to'
required: true

permissions:
contents: write
id-token: write

jobs:
publish_snapshot:
name: Publish (Snapshot)
Expand Down Expand Up @@ -36,6 +40,7 @@ jobs:
run: pnpm changeset publish --tag ${{ inputs.tag }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true

# reset, then push the dangling commit
- name: git push
Expand Down

0 comments on commit c50dcf1

Please sign in to comment.