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
22
33on :
44 push :
5+ branches :
6+ - ' master'
57 paths :
68 - ' go.mod'
79 - ' **.go'
810 - ' **.yml'
911 pull_request :
12+ branches :
13+ - ' master'
1014 paths :
1115 - ' go.mod'
1216 - ' **.go'
8791
8892 - name : Run unit tests
8993 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:
2323 goos : darwin
2424 steps :
2525 - 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
2632 - 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")
3133 with :
3234 github_token : ${{ secrets.GITHUB_TOKEN }}
3335 goos : ${{ matrix.goos }}
You can’t perform that action at this time.
0 commit comments