File tree Expand file tree Collapse file tree 9 files changed +56
-204
lines changed Expand file tree Collapse file tree 9 files changed +56
-204
lines changed Original file line number Diff line number Diff line change 11name : Generate coverage badges
22on :
33 push :
4- branches : [main ]
4+ branches : [v2 ]
55
66permissions :
77 contents : write
1010 generate-badges :
1111 runs-on : ubuntu-latest
1212 steps :
13- - uses : actions/checkout@v4
13+ - uses : actions/checkout@v5
1414
1515 # setup go environment
1616 - name : Set up Go
@@ -21,13 +21,14 @@ jobs:
2121 - name : coverage
2222 id : coverage
2323 run : |
24- go test -coverpkg=./... -coverprofile=profile.cov ./...
25- # sed -i '/cmd/d' profile.cov # remove cmd package from coverage
24+ go mod download
25+ go generate ./...
26+ go test -coverpkg=./... -coverprofile=profile.cov $(go list ./... | grep -v /cmd/)
2627 total=$(go tool cover -func profile.cov | grep '^total:' | awk '{print $3}' | sed "s/%//")
2728 rm profile.cov
2829 echo "COVERAGE_VALUE=${total}" >> $GITHUB_ENV
2930
30- - uses : actions/checkout@v4
31+ - uses : actions/checkout@v5
3132 with :
3233 repository : sgaunet/gh-action-badge
3334 path : gh-action-badge
Original file line number Diff line number Diff line change 11name : linter
22
33on :
4- pull_request :
54 push :
65
76permissions :
8- contents : write
7+ contents : read
98
109jobs :
1110 linter :
1211 runs-on : ubuntu-latest
1312 steps :
14- -
15- name : Checkout
16- uses : actions/checkout@v4
13+ - uses : actions/checkout@v5
14+ - uses : actions/setup-go@v5
1715 with :
18- fetch-depth : 0
19- - name : Install Go
20- uses : actions/setup-go@v5
16+ go-version : stable
17+ - name : Install task
18+ uses : jaxxstorm/action-install-gh-release@v1.12.0
2119 with :
22- go-version : ' >=1.24'
23- - name : Install devbox
24- uses : jetify-com/devbox-install-action@v0.12.0
20+ repo : go-task/task
21+ cache : enable
22+ # tag:
23+ - name : Install golangci-lint
24+ uses : jaxxstorm/action-install-gh-release@v1.12.0
2525 with :
26- enable-cache : true
27- devbox-version : 0.14.0
26+ repo : golangci/golangci-lint
27+ tag : v2.2.2
28+ cache : enable
29+ binaries-location : golangci-lint-2.2.2-linux-amd64
2830
29- - name : Install prerequisites
31+ - name : Run linter
3032 shell : /usr/bin/bash {0}
3133 run : |
32- devbox install
33- devbox run linter
34+ task linter
Original file line number Diff line number Diff line change @@ -16,18 +16,23 @@ jobs:
1616 steps :
1717 -
1818 name : Checkout
19- uses : actions/checkout@v4
19+ uses : actions/checkout@v5
2020 with :
2121 fetch-depth : 0
2222 - name : Install Go
2323 uses : actions/setup-go@v5
2424 with :
2525 go-version : ' >=1.24'
26- - name : Install devbox
27- uses : jetify-com/devbox -install-action@v0 .12.0
26+ - name : Install task
27+ uses : jaxxstorm/action -install-gh-release@v1 .12.0
2828 with :
29- enable-cache : true
30- devbox-version : 0.14.0
29+ repo : go-task/task
30+ # tag:
31+ - name : Install goreleaser
32+ uses : jaxxstorm/action-install-gh-release@v1.12.0
33+ with :
34+ repo : goreleaser/goreleaser
35+ # tag:
3136
3237 -
3338 # Add support for more platforms with QEMU (optional)
@@ -45,11 +50,10 @@ jobs:
4550 username : ${{ github.actor }}
4651 password : ${{ secrets.GITHUB_TOKEN }}
4752
48- - name : Install prerequisites
53+ - name : Create release
4954 shell : /usr/bin/bash {0}
5055 run : |
51- devbox install
52- devbox run release
56+ task release
5357 env :
5458 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5559 # Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
Original file line number Diff line number Diff line change 11name : snapshot
22
33on :
4- pull_request :
54 push :
65
76permissions :
8- contents : write
7+ contents : read
98
109jobs :
1110 goreleaser-snapshot :
1211 runs-on : ubuntu-latest
1312 steps :
1413 -
1514 name : Checkout
16- uses : actions/checkout@v4
15+ uses : actions/checkout@v5
1716 with :
1817 fetch-depth : 0
1918 - name : Install Go
2019 uses : actions/setup-go@v5
2120 with :
2221 go-version : ' >=1.24'
23- - name : Install devbox
24- uses : jetify-com/devbox -install-action@v0 .12.0
22+ - name : Install task
23+ uses : jaxxstorm/action -install-gh-release@v1 .12.0
2524 with :
26- enable-cache : true
27- devbox-version : 0.14.0
28-
25+ repo : go-task/task
26+ cache : true
27+ # tag:
28+ - name : Install goreleaser
29+ uses : jaxxstorm/action-install-gh-release@v1.12.0
30+ with :
31+ repo : goreleaser/goreleaser
32+ cache : true
33+ # tag:
34+
2935 -
3036 # Add support for more platforms with QEMU (optional)
3137 # https://github.com/docker/setup-qemu-action
@@ -42,11 +48,10 @@ jobs:
4248 username : ${{ github.actor }}
4349 password : ${{ secrets.GITHUB_TOKEN }}
4450
45- - name : Install prerequisites
51+ - name : Create snapshot release
4652 shell : /usr/bin/bash {0}
4753 run : |
48- devbox install
49- devbox run snapshot
54+ task snapshot
5055 env :
5156 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5257 # Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
Original file line number Diff line number Diff line change 1- dist
2- gitlab-backup2s3
3- .task
4- tst
1+ /dist
2+ /gitlab-backup2s3
3+ /.task
Original file line number Diff line number Diff line change 99
1010 disable :
1111 - wsl
12+ - wsl_v5
1213 - nlreturn
1314 - depguard
1415 - gochecknoinits
Original file line number Diff line number Diff line change 3939 release :
4040 desc : " Create a release"
4141 cmds :
42- - GITLAB_TOKEN="" goreleaser --clean --skip validate
42+ - GITLAB_TOKEN="" goreleaser --clean
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments