Skip to content

Commit 41522e0

Browse files
Wenxin-Jiangclaude
andcommitted
fix: pin checkout to tag ref for build and publish jobs
Ensures build, cargo-publish, npm-publish, and pypi-publish all checkout the exact tagged commit, matching the original workflow behavior. Prevents building from a different commit if main advances between tag creation and build. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 8ac9ed5 commit 41522e0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ jobs:
122122
- name: Checkout
123123
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
124124
with:
125+
ref: v${{ needs.version.outputs.version }}
125126
persist-credentials: false
126127

127128
- name: Install Rust
@@ -203,6 +204,7 @@ jobs:
203204
- name: Checkout
204205
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
205206
with:
207+
ref: v${{ needs.version.outputs.version }}
206208
persist-credentials: false
207209

208210
- name: Install Rust
@@ -242,6 +244,7 @@ jobs:
242244
- name: Checkout
243245
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
244246
with:
247+
ref: v${{ needs.version.outputs.version }}
245248
persist-credentials: false
246249

247250
- name: Configure git for HTTPS
@@ -323,6 +326,7 @@ jobs:
323326
- name: Checkout
324327
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
325328
with:
329+
ref: v${{ needs.version.outputs.version }}
326330
persist-credentials: false
327331

328332
- name: Download all artifacts

0 commit comments

Comments
 (0)