File tree Expand file tree Collapse file tree 2 files changed +22
-14
lines changed Expand file tree Collapse file tree 2 files changed +22
-14
lines changed Original file line number Diff line number Diff line change 46
46
- uses : actions/setup-go@v3
47
47
with :
48
48
go-version : 1.18
49
- - run : |
50
- go install github.com/mitchellh/gox@latest
51
- go install github.com/tcnksm/ghr@latest
52
49
- uses : go-semantic-release/action@v1
53
- id : semrel
54
50
with :
55
- github-token : ${{ secrets.GITHUB_TOKEN }}
56
- ghr : true
57
- - run : |
58
- gox -parallel 4 -osarch="linux/amd64 linux/arm64 darwin/amd64 darwin/arm64 linux/arm windows/amd64" -ldflags="-extldflags '-static' -s -w -X github.com/go-semantic-release/provider-git/pkg/provider.PVERSION=${{steps.semrel.outputs.version}}" -output="bin/{{.Dir}}_v${{steps.semrel.outputs.version}}_{{.OS}}_{{.Arch}}" ./cmd/provider-git/
59
- cd bin/ && shasum -a 256 * > ./provider-git_v${{steps.semrel.outputs.version}}_checksums.txt && cd -
60
- if: steps.semrel.outputs.version != ''
61
- env:
62
- CGO_ENABLED: 0
63
- - run : ghr $(cat .ghr) bin/
64
- if : steps.semrel.outputs.version != ''
51
+ hooks : goreleaser
65
52
env :
66
53
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
1
+ builds :
2
+ - env :
3
+ - CGO_ENABLED=0
4
+ targets :
5
+ - linux_amd64
6
+ - linux_arm64
7
+ - darwin_amd64
8
+ - darwin_arm64
9
+ - linux_arm
10
+ - windows_amd64
11
+ main : ./cmd/provider-git
12
+ ldflags :
13
+ - -extldflags '-static'
14
+ - -s -w -X github.com/go-semantic-release/provider-git/pkg/provider.PVERSION={{.Version}}
15
+
16
+ archives :
17
+ - format : binary
18
+ name_template : ' {{ .Binary }}_v{{ .Version }}_{{ .Os }}_{{ .Arch }}'
19
+
20
+ checksum :
21
+ name_template : ' {{ .ProjectName }}_v{{ .Version }}_checksums.txt'
You can’t perform that action at this time.
0 commit comments