File tree Expand file tree Collapse file tree 4 files changed +2
-6
lines changed Expand file tree Collapse file tree 4 files changed +2
-6
lines changed Original file line number Diff line number Diff line change 22
22
- uses : actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
23
23
with :
24
24
go-version : stable
25
- - run : echo "GOVERSION=$(go version)" >> "$GITHUB_ENV"
26
25
- uses : goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0
27
26
id : goreleaser
28
27
with :
Original file line number Diff line number Diff line change 45
45
registry : ghcr.io
46
46
username : ${{ github.repository_owner }}
47
47
password : ${{ secrets.GITHUB_TOKEN }}
48
- - name : Set up environment
49
- run : echo "GOVERSION=$(go version)" >> "$GITHUB_ENV"
50
48
- uses : advanced-security/sbom-generator-action@375dee8e6144d9fd0ec1f5667b4f6fb4faacefed # v0.0.1
51
49
id : sbom
52
50
env :
Original file line number Diff line number Diff line change 9
9
-s -w
10
10
-X "main.commit={{.Commit}}"
11
11
-X "main.date={{.Date}}"
12
- -X "main.goVersion={{.Env.GOVERSION}}"
13
12
-X "main.projectName={{.ProjectName}}"
14
13
-X "main.version=v{{.Version}}"
15
14
env :
Original file line number Diff line number Diff line change @@ -3,13 +3,13 @@ package main
3
3
import (
4
4
"encoding/json"
5
5
"fmt"
6
+ "runtime"
6
7
)
7
8
8
9
// These variables are set by GoReleaser during the build.
9
10
var (
10
11
commit string
11
12
date string
12
- goVersion string
13
13
projectName string
14
14
version string
15
15
)
@@ -31,7 +31,7 @@ func (*VersionCmd) Run() error {
31
31
version ,
32
32
commit ,
33
33
date ,
34
- goVersion ,
34
+ runtime . Version () ,
35
35
})
36
36
if err != nil {
37
37
return err
You can’t perform that action at this time.
0 commit comments