Skip to content

Commit 10d1a54

Browse files
authored
Explicitly fetching fetching git tags for CI builds (#7395)
For go builds to correctly apply version to binary. Signed-off-by: Johan Fylling <johan.dev@fylling.se>
1 parent 6088316 commit 10d1a54

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.github/workflows/post-merge.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ jobs:
9090
steps:
9191
- name: Check out code
9292
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
93+
fetch-tags: true
9394

9495
- name: Build Linux and Windows
9596
run: make ci-go-ci-build-linux ci-go-ci-build-linux-static ci-go-ci-build-windows
@@ -118,6 +119,7 @@ jobs:
118119
steps:
119120
- name: Check out code
120121
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
122+
fetch-tags: true
121123

122124
- id: go_version
123125
name: Read go version
@@ -150,6 +152,7 @@ jobs:
150152
steps:
151153
- name: Check out code
152154
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
155+
fetch-tags: true
153156

154157
- name: Test
155158
run: make ci-release-test

.github/workflows/post-tag.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
steps:
1313
- name: Check out code
1414
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
15+
fetch-tags: true
1516
with:
1617
token: ${{ secrets.GH_PUSH_TOKEN }}
1718

@@ -25,6 +26,7 @@ jobs:
2526
steps:
2627
- name: Check out code
2728
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
29+
fetch-tags: true
2830

2931
- name: Build Linux and Windows
3032
run: make ci-go-ci-build-linux ci-go-ci-build-linux-static ci-go-ci-build-windows
@@ -53,6 +55,7 @@ jobs:
5355
steps:
5456
- name: Check out code
5557
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
58+
fetch-tags: true
5659

5760
- id: go_version
5861
name: Read go version

0 commit comments

Comments
 (0)