Skip to content

Commit 831715a

Browse files
committed
Add /snapit release workflow with provenance
1 parent 6807260 commit 831715a

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/snapit.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Snapit with provenance
2+
3+
on:
4+
issue_comment:
5+
types:
6+
- created
7+
8+
jobs:
9+
snapit:
10+
name: Snapit
11+
if: ${{ github.event.issue.pull_request && github.event.comment.body == '/snapit' }}
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
15+
pull-requests: write
16+
id-token: write
17+
steps:
18+
# This action can be executed by users with write permission to this repo
19+
- name: Checkout current branch
20+
uses: actions/checkout@v4
21+
22+
- name: Force snapshot changeset
23+
run: |
24+
printf -- "---\n'shopify-buy': patch\n'"
25+
26+
- name: Create snapshot version
27+
uses: Shopify/snapit@0c0d2dd62c9b0c94b7d03e1f54e72f18548e7752 # pin to a specific commit
28+
with:
29+
github_comment_included_packages: 'shopify-buy'
30+
build_script: 'npm run build'
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
34+
NPM_CONFIG_PROVENANCE: true

0 commit comments

Comments
 (0)