File tree 3 files changed +7
-5
lines changed
3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 40
40
go-version : " >=1.19.7"
41
41
-
42
42
name : Go Build
43
- run : go build -o ./win-build/ssh-sync.exe
43
+ run : go build -o ./win-build/ssh-sync.exe -ldflags "-X main.version=${{github.ref_name}}"
44
44
shell : powershell
45
45
-
46
46
name : Inno Build
61
61
with :
62
62
go-version : " >=1.19.7"
63
63
- name : Go Build
64
- run : go build -o ssh-sync
64
+ run : go build -o ssh-sync -ldflags "-X main.version=${{github.ref_name}}"
65
65
- name : Upload Artifact
66
66
uses : actions/upload-artifact@v3
67
67
with :
Original file line number Diff line number Diff line change 32
32
go-version : " >=1.19.7"
33
33
-
34
34
name : Go Build
35
- run : go build -o ./win-build/ssh-sync.exe
35
+ run : go build -o ./win-build/ssh-sync.exe -ldflags "-X main.version=${{github.ref_name}}"
36
36
shell : powershell
37
37
-
38
38
name : Inno Build
47
47
with :
48
48
go-version : " >=1.19.7"
49
49
- name : Go Build
50
- run : go build -o ssh-sync
50
+ run : go build -o ssh-sync -ldflags "-X main.version=${{github.ref_name}}"
Original file line number Diff line number Diff line change @@ -8,10 +8,12 @@ import (
8
8
"github.com/urfave/cli/v2"
9
9
)
10
10
11
+ var version string
12
+
11
13
func main () {
12
14
app := & cli.App {
13
15
Name : "ssh-sync" ,
14
- Version : "v0.2.4" ,
16
+ Version : version ,
15
17
Description : "Syncs your ssh keys to a remote server" ,
16
18
Commands : []* cli.Command {
17
19
{
You can’t perform that action at this time.
0 commit comments