Skip to content

Commit ad71974

Browse files
committed
Checkout fetch-depth:0 so version stamping can find the latest tag
1 parent c1f6d67 commit ad71974

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ jobs:
3838
runs-on: ubuntu-latest
3939
steps:
4040
- uses: actions/checkout@v4
41-
with:
42-
fetch-tags: true
4341
- uses: actions/setup-go@v5
4442
with:
4543
go-version-file: go.mod
@@ -64,14 +62,15 @@ jobs:
6462
steps:
6563
- uses: actions/checkout@v4
6664
with:
65+
fetch-depth: 0
6766
fetch-tags: true
6867
- uses: actions/setup-go@v4
6968
with:
7069
go-version-file: go.mod
7170
cache: true
7271
- name: Build ${{ matrix.goos }} ${{ matrix.goarch }}
7372
run: |
74-
env
73+
env | sort
7574
go build -v -trimpath \
7675
-o build/adif-multitool-${{ matrix.goos }}-${{ matrix.goarch }}/ \
7776
-ldflags "-X 'main.version=$(git describe --dirty --match='v[0-9]*')'" \

0 commit comments

Comments
 (0)