Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup NPM provenance statements #2723

Merged
merged 2 commits into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/changesets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:
runs-on: ubuntu-latest
if: github.repository_owner == 'shopify'
name: Changelog PR or Release
permissions:
id-token: write
outputs:
published: ${{ steps.changesets.outputs.published }}
# A JSON array to present the published packages. The format is [{"name": "@xx/xx", "version": "1.2.0"}, {"name": "@xx/xy", "version": "0.8.9"}]
Expand Down Expand Up @@ -63,6 +65,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.SHOPIFY_GH_ACCESS_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true

compile:
needs: changelog
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/next-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
runs-on: ubuntu-latest
# don't run if a commit message with [ci] release is present. The release workflow will do the release
if: github.repository_owner == 'shopify' && !startsWith(github.event.head_commit.message, '[ci] release')
permissions:
id-token: write
outputs:
NEXT_VERSION: ${{ steps.version.outputs.NEXT_VERSION }}
steps:
Expand Down Expand Up @@ -60,6 +62,7 @@ jobs:
npm run version:post
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_CONFIG_PROVENANCE: true

- name: 🏗 Build
if: steps.version.outputs.NEXT_VERSION
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/snapit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ jobs:
name: Snapit
if: ${{ github.event.issue.pull_request && github.event.comment.body == '/snapit' }}
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
# WARNING: DO NOT RUN ANY CUSTOM LOCAL SCRIPT BEFORE RUNNING THE SNAPIT ACTION
# This action can be executed by 3rd party users and it should not be able to run arbitrary code from a PR.
Expand All @@ -29,3 +31,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
rbshop marked this conversation as resolved.
Show resolved Hide resolved
Loading