Skip to content

Commit

Permalink
ghactions: Fix version generation for ghactions builds
Browse files Browse the repository at this point in the history
gvproxy --version uses the `git describe` to automatically generate the
version.
actions/checkout by default creates a 1 commit checkout with no
history/no tags, which will prevent git describe from generating a
useful version.

This commit instructs actions/checkout to use full checkouts with all
tags.

Signed-off-by: Christophe Fergeau <[email protected]>
  • Loading branch information
cfergeau committed Jan 22, 2024
1 parent 6ded4a2 commit 2d837fd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ jobs:
go-version: ["1.20.x", "1.21.x", "1.22.0-rc.1"]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # history/tags are needed for automatic version generation
fetch-tags: true

- name: Set up Go
uses: actions/setup-go@v3
Expand Down

0 comments on commit 2d837fd

Please sign in to comment.