1- name : Changeset Release
1+ name : Release
22
33on :
4- workflow_dispatch :
4+ # Trigger for snapit functionality
5+ issue_comment :
6+ types :
7+ - created
8+
9+ # Trigger for changeset release functionality
510 push :
611 branches :
712 - main
813 - stable/3.*
914
15+ # Trigger for manual/cron release functionality
16+ schedule :
17+ - cron : ' 0 6 * * *' # 6:00 AM UTC every day
18+
19+ workflow_dispatch :
20+ inputs :
21+ tag :
22+ description : ' Tag'
23+ default : ' nightly'
24+ type : choice
25+ options :
26+ - nightly
27+ - latest
28+ - experimental
29+
1030concurrency :
1131 group : changeset-${{ github.head_ref || github.run_id }}
1232 cancel-in-progress : true
1636 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
1737
1838jobs :
39+ # Snapit job - runs when /snapit comment is made on a PR
40+ snapit :
41+ name : Snapit
42+ if : ${{ github.event_name == 'issue_comment' && github.event.issue.pull_request && github.event.comment.body == '/snapit' }}
43+ runs-on : ubuntu-latest
44+ permissions :
45+ contents : read
46+ pull-requests : write
47+ id-token : write
48+ steps :
49+ # WARNING: DO NOT RUN ANY CUSTOM LOCAL SCRIPT BEFORE RUNNING THE SNAPIT ACTION
50+ # This action can be executed by 3rd party users and it should not be able to run arbitrary code from a PR.
51+ - name : Checkout current branch
52+ uses : actions/checkout@v4
53+ with :
54+ fetch-depth : 0
55+ - name : Setup deps
56+ uses : ./.github/actions/setup-cli-deps
57+ with :
58+ node-version : 24.12.0
59+ - name : Force snapshot changeset
60+ run : " mv .changeset/force-snapshot-build.md.ignore .changeset/force-snapshot-build.md"
61+ - name : Create snapshot version
62+ uses : Shopify/snapit@8dacdbe980a7628cf65d9b1d838ee7103450c6b8 # 8dacdbe980a7628cf65d9b1d838ee7103450c6b8
63+ with :
64+ global_install : ' true'
65+ github_comment_included_packages : ' @shopify/cli'
66+ custom_message_suffix : "
67+ > [!CAUTION]
68+
69+ > After installing, validate the version by running just `shopify` in your terminal.
70+
71+ > If the versions don't match, you might have multiple global instances installed.
72+
73+ > Use `which shopify` to find out which one you are running and uninstall it."
74+ package_manager : ' npm'
75+ shopify_registry : ' https://registry.npmjs.org'
76+ build_script : " pnpm nx run-many --target=bundle --all --skip-nx-cache --output-style=stream && pnpm refresh-manifests"
77+ env :
78+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
79+ NPM_TOKEN : ' '
80+ NPM_CONFIG_PROVENANCE : true
81+ SHOPIFY_CLI_BUILD_REPO : ${{ github.repository }}
82+
83+ # Changeset release job - runs on push to main or stable branches
1984 changeset-release :
2085 name : Changeset Release
86+ if : ${{ github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag == '') }}
2187 runs-on : ubuntu-latest
2288 permissions :
2389 contents : write
@@ -27,19 +93,52 @@ jobs:
2793 - uses : actions/checkout@v3
2894 # This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
2995 with :
30- fetch-depth : 1
96+ fetch-depth : 0
3197 - name : Setup deps
3298 uses : ./.github/actions/setup-cli-deps
3399 with :
34- node-version : 24.1 .0
100+ node-version : 24.12 .0
35101 - name : Create Release Pull Request
36- uses : changesets/action@e9cc34b540dd3ad1b030c57fd97269e8f6ad905a # pin@v1
102+ id : changesets
103+ uses : changesets/action@e0145edc7d9d8679003495b11f87bd8ef63c0cba # v1
37104 with :
38105 version : pnpm changeset-manifests
39106 title : Version Packages - ${{ github.ref_name }}
40- publish : pnpm release latest
107+ createGithubReleases : false
108+ env :
109+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
110+
111+ - name : Publish packages
112+ if : steps.changesets.outputs.hasChangesets == 'false'
113+ run : pnpm release latest
41114 env :
42- NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
115+ NPM_TOKEN : ' '
43116 NPM_CONFIG_PROVENANCE : true
44117 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
45118 SHOPIFY_CLI_BUILD_REPO : ${{ github.repository }}
119+
120+ # Manual/Cron release job - runs on schedule or manual trigger with tag
121+ manual-cron-release :
122+ name : Manual & Cron Release
123+ if : ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag != '') }}
124+ runs-on : ubuntu-latest
125+ permissions :
126+ contents : read
127+ pull-requests : write
128+ id-token : write
129+ steps :
130+ - uses : actions/checkout@v3
131+ # This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
132+ with :
133+ fetch-depth : 0
134+ - name : Setup deps
135+ uses : ./.github/actions/setup-cli-deps
136+ with :
137+ node-version : 24.12.0
138+ - name : Release
139+ run : pnpm release ${{ github.event.inputs.tag || 'nightly' }}
140+ env :
141+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
142+ NPM_TOKEN : ' '
143+ NPM_CONFIG_PROVENANCE : true
144+ SHOPIFY_CLI_BUILD_REPO : ${{ github.repository }}
0 commit comments