File tree Expand file tree Collapse file tree 5 files changed +98
-0
lines changed
Expand file tree Collapse file tree 5 files changed +98
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ workflow_dispatch :
5+ push :
6+ tags :
7+ - ' v*'
8+
9+ permissions :
10+ contents : write
11+
12+ jobs :
13+ goreleaser :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - name : Check out code
17+ uses : actions/checkout@v3
18+ with :
19+ fetch-depth : 0
20+
21+ - name : Set up Go
22+ uses : actions/setup-go@v5
23+
24+ - name : Run GoReleaser
25+ uses : goreleaser/goreleaser-action@v6
26+ with :
27+ distribution : goreleaser
28+ version : ' latest'
29+ args : release --clean
30+ env :
31+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1+ build /
2+ dist /
3+ mise.toml
4+ .mise.toml
5+ .env
Original file line number Diff line number Diff line change 1+ version : 2
2+ project_name : cartomancer
3+ builds :
4+ - env :
5+ - CGO_ENABLED=0
6+ goos :
7+ - linux
8+ goarch :
9+ - amd64
10+ flags :
11+ - -trimpath
12+ ldflags :
13+ - -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
14+ dir : ./src
15+ binary : cartomancer-linux-amd64
16+
17+ archives : []
18+
19+ release :
20+ github :
21+ owner : arcanaland
22+ name : cartomancer
23+ draft : false
24+ prerelease : false
25+ name_template : " {{ .ProjectName }}-v{{ .Version }}"
26+ extra_files :
27+ - glob : " ./**/cartomancer-linux-amd64"
28+
29+ checksum :
30+ name_template : " {{ .ProjectName }}_{{ .Version }}_checksums.txt"
31+
32+ changelog :
33+ sort : asc
34+ filters :
35+ exclude :
36+ - " ^chore:"
37+ - " ^test:"
Original file line number Diff line number Diff line change 1+ build :
2+ rm -rf build
3+ mkdir build
4+ go build -o build/ cartomancer ./ ...
5+
6+ release version = " 0.2.0":
7+ git tag v{{ version}}
8+ git push origin v{{ version}}
9+
10+ release-local version = " 0.2.0":
11+ #!/ bin/ bash
12+ . .env
13+ git tag v{{ version}}
14+ goreleaser release
15+
Original file line number Diff line number Diff line change 1+ pre-commit :
2+ commands :
3+ gofmt :
4+ run : |
5+ set -e
6+ for file in $(git diff --cached --name-only --diff-filter=ACM | grep '\.go$'); do
7+ gofmt -w "$file"
8+ git add "$file"
9+ done
10+ glob : " *.go"
You can’t perform that action at this time.
0 commit comments