File tree Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Release
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - ' v*'
7
+
8
+ jobs :
9
+ build-and-release :
10
+ runs-on : ubuntu-latest
11
+ permissions :
12
+ contents : write
13
+ steps :
14
+ - uses : actions/checkout@v4
15
+
16
+ - name : Set up Go
17
+ uses : actions/setup-go@v4
18
+ with :
19
+ go-version : ' 1.22'
20
+
21
+ - name : Build binaries
22
+ run : |
23
+ mkdir -p ./cli/build
24
+ CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o ./cli/build/enumer.linux-amd64 .
25
+ CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -a -o ./cli/build/enumer.linux-arm64 .
26
+ CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -a -o ./cli/build/enumer.darwin-amd64 .
27
+ CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -a -o ./cli/build/enumer.darwin-arm64 .
28
+ CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -a -o ./cli/build/enumer.windows-amd64.exe .
29
+
30
+ - name : Create archives
31
+ run : |
32
+ cd ./cli/build
33
+ tar czf enumer.linux-amd64.tar.gz enumer.linux-amd64
34
+ tar czf enumer.linux-arm64.tar.gz enumer.linux-arm64
35
+ tar czf enumer.darwin-amd64.tar.gz enumer.darwin-amd64
36
+ tar czf enumer.darwin-arm64.tar.gz enumer.darwin-arm64
37
+ tar czf enumer.windows-amd64.exe.tar.gz enumer.windows-amd64.exe
38
+
39
+ - name : Generate checksums
40
+ run : |
41
+ cd ./cli/build
42
+ shasum -a 256 *.tar.gz > sha256sum.txt
43
+ cat sha256sum.txt
44
+
45
+ - name : Create Release
46
+ uses : softprops/action-gh-release@v2
47
+ with :
48
+ files : |
49
+ cli/build/enumer.linux-amd64.tar.gz
50
+ cli/build/enumer.linux-arm64.tar.gz
51
+ cli/build/enumer.darwin-amd64.tar.gz
52
+ cli/build/enumer.darwin-arm64.tar.gz
53
+ cli/build/enumer.windows-amd64.exe.tar.gz
54
+ cli/build/sha256sum.txt
55
+ generate_release_notes : true
You can’t perform that action at this time.
0 commit comments