File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -2,11 +2,15 @@ name: CI
2
2
3
3
on :
4
4
push :
5
+ branches :
6
+ - ' master'
5
7
paths :
6
8
- ' go.mod'
7
9
- ' **.go'
8
10
- ' **.yml'
9
11
pull_request :
12
+ branches :
13
+ - ' master'
10
14
paths :
11
15
- ' go.mod'
12
16
- ' **.go'
87
91
88
92
- name : Run unit tests
89
93
run : go test -race ./...
94
+
95
+ - name : Build
96
+ run : |
97
+ go build -v
98
+ ./grom version
Original file line number Diff line number Diff line change @@ -23,11 +23,13 @@ jobs:
23
23
goos : darwin
24
24
steps :
25
25
- uses : actions/checkout@v4
26
+ - name : Declare variables
27
+ shell : bash
28
+ run : |
29
+ echo "GO_VERSION='go1.19.13'" >> $GITHUB_ENV
30
+ echo "BUILD_TIME=$(env TZ=Asia/Shanghai date '+%Y-%m-%d %H:%M:%S')" >> $GITHUB_ENV
31
+ echo "GIT_COMMIT=$(git rev-parse --short=10 $GITHUB_SHA)" >> $GITHUB_ENV
26
32
- uses : wangyoucao577/go-release-action@v1
27
- env :
28
- GO_VERSION : " go1.19.13"
29
- BUILD_TIME : $(date "+%Y-%m-%d %H:%M:%S")
30
- GIT_COMMIT : $(git rev-parse --short=10 "$GITHUB_SHA")
31
33
with :
32
34
github_token : ${{ secrets.GITHUB_TOKEN }}
33
35
goos : ${{ matrix.goos }}
You can’t perform that action at this time.
0 commit comments