Skip to content

Commit f58b9c9

Browse files
committed
chore: update github workflows
1 parent 7fc3dac commit f58b9c9

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@ name: CI
22

33
on:
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'
@@ -87,3 +91,8 @@ jobs:
8791
8892
- name: Run unit tests
8993
run: go test -race ./...
94+
95+
- name: Build
96+
run: |
97+
go build -v
98+
./grom version

.github/workflows/release.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff 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 }}

0 commit comments

Comments
 (0)