From e8e48b2440c2d6e1ff23b35cb9c97ac688be576d Mon Sep 17 00:00:00 2001 From: Zlatko Bratkovic Date: Tue, 27 Jan 2026 16:08:05 +0100 Subject: [PATCH] BUG/MINOR: allow running on all maintained go versions --- .github/workflows/goreleaser.yml | 13 ++++++------- .gitignore | 1 + go.mod | 2 +- token.go | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index 13ac961..ad43dcf 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -12,16 +12,15 @@ jobs: goreleaser: runs-on: ubuntu-latest steps: - - - name: Checkout + - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 - - - name: Set up Go - uses: actions/setup-go@v5 - - - name: Run GoReleaser + - name: Set up Go + uses: actions/setup-go@v6 + with: + go-version: 'stable' # Latest stable version + - name: Run GoReleaser uses: goreleaser/goreleaser-action@v6 with: distribution: goreleaser diff --git a/.gitignore b/.gitignore index 63116a4..c4c8fdd 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ Session.vim # VSC .vscode check-commit +.env diff --git a/go.mod b/go.mod index 588656e..c7d75d8 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/haproxytech/check-commit/v5 -go 1.25.0 +go 1.24.0 require ( github.com/fatih/camelcase v1.0.0 diff --git a/token.go b/token.go index 8eef815..97c1e59 100644 --- a/token.go +++ b/token.go @@ -2,10 +2,10 @@ package main import "os" -func getAPIToken(alterative string) string { +func getAPIToken(alternative string) string { token := os.Getenv("API_TOKEN") if token == "" { - token = os.Getenv(alterative) + token = os.Getenv(alternative) } return token