Skip to content

Commit eef13d8

Browse files
committed
fix(ci): add fetch-tags: true to release build checkouts
actions/checkout@v4 with fetch-depth: 0 does not automatically fetch tags. Without tags, git describe --tags --always falls back to the raw commit SHA, which gets baked into the binary by the Generate version file step. Add fetch-tags: true to all three platform build jobs (Linux, macOS, Windows) so git describe can find the release tag and produce the correct version string.
1 parent 4977f5e commit eef13d8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ jobs:
8484
uses: actions/checkout@v4
8585
with:
8686
fetch-depth: 0
87+
fetch-tags: true
8788

8889
- name: Cache Swift packages
8990
uses: actions/cache@v5
@@ -206,6 +207,7 @@ jobs:
206207
uses: actions/checkout@v4
207208
with:
208209
fetch-depth: 0
210+
fetch-tags: true
209211

210212
- name: Setup Swift
211213
uses: swift-actions/setup-swift@364295d9c23900ce04d4e5cc708387921b4e50f9 # v3
@@ -485,6 +487,7 @@ jobs:
485487
uses: actions/checkout@v4
486488
with:
487489
fetch-depth: 0
490+
fetch-tags: true
488491

489492
- name: Setup Swift
490493
uses: compnerd/gha-setup-swift@c8363f1001fbb4b12d127c432f9eaadec5f56e8c # main

0 commit comments

Comments
 (0)