File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222 - uses : actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
2323 with :
2424 go-version : stable
25- - run : echo "GOVERSION=$(go version)" >> "$GITHUB_ENV"
2625 - uses : goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0
2726 id : goreleaser
2827 with :
Original file line number Diff line number Diff line change 4545 registry : ghcr.io
4646 username : ${{ github.repository_owner }}
4747 password : ${{ secrets.GITHUB_TOKEN }}
48- - name : Set up environment
49- run : echo "GOVERSION=$(go version)" >> "$GITHUB_ENV"
5048 - uses : advanced-security/sbom-generator-action@375dee8e6144d9fd0ec1f5667b4f6fb4faacefed # v0.0.1
5149 id : sbom
5250 env :
Original file line number Diff line number Diff line change 99 -s -w
1010 -X "main.commit={{.Commit}}"
1111 -X "main.date={{.Date}}"
12- -X "main.goVersion={{.Env.GOVERSION}}"
1312 -X "main.projectName={{.ProjectName}}"
1413 -X "main.version=v{{.Version}}"
1514 env :
Original file line number Diff line number Diff line change @@ -3,13 +3,13 @@ package main
33import (
44 "encoding/json"
55 "fmt"
6+ "runtime"
67)
78
89// These variables are set by GoReleaser during the build.
910var (
1011 commit string
1112 date string
12- goVersion string
1313 projectName string
1414 version string
1515)
@@ -31,7 +31,7 @@ func (*VersionCmd) Run() error {
3131 version ,
3232 commit ,
3333 date ,
34- goVersion ,
34+ runtime . Version () ,
3535 })
3636 if err != nil {
3737 return err
You can’t perform that action at this time.
0 commit comments