Skip to content

Commit 5762c1a

Browse files
committed
refactor: use Runtime.Goversion for dynamic Go version
- Replace hardcoded GO_VERSION env var with Runtime.Goversion template - Remove GO_VERSION from GitHub Actions workflow - Automatically detects Go version at build time - More maintainable approach following best practices
1 parent 1c64bee commit 5762c1a

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

.github/workflows/release.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ jobs:
4545
env:
4646
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4747
HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
48-
GO_VERSION: "go1.24"
4948

5049
- name: Upload assets
5150
uses: actions/upload-artifact@v4

.goreleaser.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ builds:
3737
- -X main.version={{.Version}}
3838
- -X main.commit={{.ShortCommit}}
3939
- -X main.buildDate={{.Date}}
40-
- -X main.goVersion={{.Env.GO_VERSION}}
40+
- -X main.goVersion={{.Runtime.Goversion}}
4141
- -X main.builtBy=goreleaser
4242

4343
archives:

0 commit comments

Comments
 (0)