File tree Expand file tree Collapse file tree 2 files changed +65
-0
lines changed Expand file tree Collapse file tree 2 files changed +65
-0
lines changed Original file line number Diff line number Diff line change 1+ name : goreleaser
2+
3+ on :
4+ push :
5+ # run only against tags
6+ tags :
7+ - ' *'
8+
9+ permissions :
10+ contents : write
11+ # packages: write
12+ # issues: write
13+
14+ jobs :
15+ goreleaser :
16+ runs-on : ubuntu-latest
17+ env :
18+ # 声明哪些是私仓
19+ GOPRIVATE : github.com/scagogogo/*
20+ steps :
21+ - uses : actions/checkout@v3
22+ with :
23+ fetch-depth : 0
24+ - run : git config --global url.https://${{ secrets.GH_CLASS_VERSION_TRACKER_TOKEN }}@github.com/.insteadOf https://github.com/
25+ - run : git fetch --force --tags
26+ - uses : actions/setup-go@v3
27+ with :
28+ go-version : ' >=1.19.2'
29+ cache : true
30+ # More assembly might be required: Docker logins, GPG, etc. It all depends
31+ # on your needs.
32+ - uses : goreleaser/goreleaser-action@v2
33+ with :
34+ # either 'goreleaser' (default) or 'goreleaser-pro'
35+ distribution : goreleaser
36+ version : latest
37+ args : release --rm-dist
38+ env :
39+ GITHUB_TOKEN : ${{ secrets.GH_CLASS_VERSION_TRACKER_TOKEN }}
40+ # Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
41+ # GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
Original file line number Diff line number Diff line change 1+ project_name : class-version-tracker
2+
3+ before :
4+ hooks :
5+ - go mod tidy
6+ - go generate ./...
7+ builds :
8+ - env :
9+ - CGO_ENABLED=0
10+ goos :
11+ - darwin
12+ - windows
13+ - linux
14+ goarch :
15+ - 386
16+ - amd64
17+ - arm64
18+ archives :
19+ - name_template : " {{ .ProjectName }}_{{ .Tag }}_{{ .Os }}_{{ .Arch }}"
20+ format_overrides :
21+ - goos : windows
22+ format : zip
23+ snapshot :
24+ name_template : " {{ incpatch .Version }}"
You can’t perform that action at this time.
0 commit comments