File tree Expand file tree Collapse file tree 2 files changed +36
-20
lines changed
Expand file tree Collapse file tree 2 files changed +36
-20
lines changed Original file line number Diff line number Diff line change 1- name : Release
1+ name : ' 🧑🏭 '
22
3- on :
4- push :
5- tags :
6- - " *"
3+ on : [ push, pull_request ]
74
85jobs :
9- build :
10- runs-on : ubuntu-latest
116
7+ check :
8+ runs-on : ubuntu-22.04
129 steps :
10+
1311 - name : Checkout
1412 uses : actions/checkout@v4
13+ with :
14+ fetch-depth : 0
1515
1616 - name : Setup Go
17- uses : actions/setup-go@v4
17+ uses : actions/setup-go@v5
18+ with :
19+ go-version-file : ' go.mod'
20+ check-latest : true
21+ cache : true
22+
23+ - name : Run linter and tests
24+ run : go test -v -vet='all' ./...
25+
26+ release :
27+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') == true
28+ needs : check
29+ runs-on : ubuntu-22.04
30+ steps :
31+
32+ - name : Checkout
33+ uses : actions/checkout@v4
1834 with :
19- go-version : 1.20.x
35+ fetch-depth : 0
2036
21- - name : Install dependencies
22- run : go get .
37+ - name : Setup Go
38+ uses : actions/setup-go@v5
39+ with :
40+ go-version-file : ' go.mod'
41+ check-latest : true
42+ cache : true
2343
2444 - name : Build windows/amd64
2545 run : GOOS=windows GOARCH=amd64 go build -o ChunkCleaner-Win64.exe
2646
2747 - name : Build linux/amd64
28- run : GOOS=linux GOARCH=amd64 go build -o ChunkCleaner-Linux64 -v ./...
29-
30- - name : Debug - List files
31- run : |
32- ls ${{ github.workspace }}
48+ run : GOOS=linux GOARCH=amd64 go build -o ChunkCleaner-Linux64
3349
3450 - name : Release
3551 uses : marvinpinto/action-automatic-releases@latest
Original file line number Diff line number Diff line change 1- # If you prefer the allow list template instead of the deny list, see community template:
2- # https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
3- #
1+ / ChunkCleaner-Linux64
2+ / ChunkCleaner-Win64.exe
3+
44# Binaries for programs and plugins
55* .exe
66* .exe~
@@ -22,4 +22,4 @@ go.work
2222
2323# User-specific stuff
2424.idea /
25- * .iml
25+ * .iml
You can’t perform that action at this time.
0 commit comments