File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Go Check
2+ on : [push, pull_request]
3+ jobs :
4+ check :
5+ runs-on : ubuntu-latest
6+ strategy :
7+ matrix :
8+ go : [1.20.x, 1.21.x, 1.22.x]
9+ steps :
10+ - name : Setup Go environment
11+ uses : actions/setup-go@v5
12+ with :
13+ go-version : ${{ matrix.go }}
14+ stable : true
15+
16+ - name : Check out code into the Go module directory
17+ uses : actions/checkout@v4
18+
19+ - name : Get dependencies
20+ run : go get -v -t -d ./...
21+
22+ - name : Test
23+ run : go test ./...
Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ workflow_run :
5+ workflows : ["Go Check"]
6+ types :
7+ - completed
8+ branches :
9+ - master
10+
11+ jobs :
12+ release :
13+
14+ runs-on : ubuntu-latest
15+ if : ${{ github.event.workflow_run.conclusion == 'success' }}
16+
17+ steps :
18+ - name : Checkout code
19+ uses : actions/checkout@v4
20+
21+ - name : Setup Go environment
22+ uses : actions/setup-go@v5
23+ with :
24+ go-version : 1.22.x
25+ stable : true
26+
27+ - name : Get dependencies
28+ run : go get -v -t -d ./...
29+
30+ - name : Build
31+ run : |
32+ TAG=$(git describe --tags --abbrev=0)
33+ GIT_TAG=$TAG make clean build
34+
35+ - name : Create release
36+ if : startsWith(github.ref, 'refs/tags/v')
37+ uses : svenstaro/upload-release-action@v2
38+ with :
39+ repo_token : ${{ secrets.GITHUB_TOKEN }}
40+ files : build/*
41+ tag : ${{ github.ref }}
42+ overwrite : true
43+ file_glob : true
44+ name : Release ${{ github.ref }}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ * @ gotify/committers
You can’t perform that action at this time.
0 commit comments