Skip to content

Commit 0e35588

Browse files
committed
g
1 parent 1b47164 commit 0e35588

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/go.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,17 @@ jobs:
1616
go-version: 1.13
1717
id: go
1818

19+
- name: Get current time
20+
uses: gerred/actions/current-time@master
21+
id: current-time
22+
1923
- name: Check out code into the Go module directory
2024
uses: actions/checkout@v1
2125

2226
- name: echo git hash
2327
run: echo ${{ github.sha }} > Release.txt
2428
- name: Build Golang Executorable Release
25-
run: go build -ldflags "-s -w -X main.buildTime=$(shell date -u '+%Y-%m-%dT%I:%M:%S%p') -X main.gitHash=$(shell git rev-parse HEAD)" -o sshfortress_${{ matrix.platform }}.release
29+
run: go build -ldflags "-s -w -X main.buildTime='${{ steps.current-time.outputs.time }}' -X main.gitHash=${{ github.sha }}" -o sshfortress_${{ matrix.platform }}.release
2630
- name: show build file
2731
run: ls -al
2832
- name: Release

0 commit comments

Comments
 (0)