This repository was archived by the owner on May 30, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +58
-1
lines changed Expand file tree Collapse file tree 3 files changed +58
-1
lines changed Original file line number Diff line number Diff line change 41
41
platforms : linux/amd64 # ,linux/arm64
42
42
push : true
43
43
tags : ${{ steps.docker_meta.outputs.tags }}
44
+
45
+ release :
46
+ runs-on : ubuntu-latest
47
+ steps :
48
+ -
49
+ name : Checkout
50
+ uses : actions/checkout@v2
51
+ -
52
+ uses : actions/setup-go@v1
53
+ with :
54
+ go-version : ' 1.17'
55
+ -
56
+ name : test
57
+ run : go test -cpu 4 -coverprofile .testCoverage.txt $(go list ./... | grep -v model/ent | grep -v mock)
58
+ env :
59
+ GIN_MODE : release
60
+ -
61
+ name : build
62
+ run : sh ./scripts/build-cli.sh
63
+ -
64
+ name : release
65
+ uses : " marvinpinto/action-automatic-releases@latest"
66
+ with :
67
+ repo_token : " ${{ github.token }}"
68
+ prerelease : true
69
+ files : |
70
+ release/gitploy_*.tar.gz
71
+ release/gitploy_checksums.txt
Original file line number Diff line number Diff line change 15
15
# Dependency directories (remove the comment below to include it)
16
16
# vendor/
17
17
.env
18
- * .db
18
+ * .db
19
+
20
+ release /
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ set -e
3
+ set -x
4
+
5
+ # disable CGO for cross-compiling
6
+ export CGO_ENABLED=0
7
+
8
+ # compile for all architectures
9
+ GOOS=linux GOARCH=amd64 go build -ldflags " -X main.Version=${GITHUB_REF_NAME## v} " -o release/linux/amd64/gitploy ./cmd/cli
10
+ GOOS=linux GOARCH=arm64 go build -ldflags " -X main.Version=${GITHUB_REF_NAME## v} " -o release/linux/arm64/gitploy ./cmd/cli
11
+ GOOS=linux GOARCH=ppc64le go build -ldflags " -X main.Version=${GITHUB_REF_NAME## v} " -o release/linux/ppc64le/gitploy ./cmd/cli
12
+ GOOS=linux GOARCH=arm go build -ldflags " -X main.Version=${GITHUB_REF_NAME## v} " -o release/linux/arm/gitploy ./cmd/cli
13
+ GOOS=windows GOARCH=amd64 go build -ldflags " -X main.Version=${GITHUB_REF_NAME## v} " -o release/windows/amd64/gitploy.exe ./cmd/cli
14
+ GOOS=darwin GOARCH=amd64 go build -ldflags " -X main.Version=${GITHUB_REF_NAME## v} " -o release/darwin/amd64/gitploy ./cmd/cli
15
+ GOOS=darwin GOARCH=arm64 go build -ldflags " -X main.Version=${GITHUB_REF_NAME## v} " -o release/darwin/arm64/gitploy ./cmd/cli
16
+
17
+ # tar binary files prior to upload
18
+ tar -cvzf release/gitploy_linux_amd64.tar.gz -C release/linux/amd64 gitploy
19
+ tar -cvzf release/gitploy_linux_arm64.tar.gz -C release/linux/arm64 gitploy
20
+ tar -cvzf release/gitploy_linux_ppc64le.tar.gz -C release/linux/ppc64le gitploy
21
+ tar -cvzf release/gitploy_linux_arm.tar.gz -C release/linux/arm gitploy
22
+ tar -cvzf release/gitploy_windows_amd64.tar.gz -C release/windows/amd64 gitploy.exe
23
+ tar -cvzf release/gitploy_darwin_amd64.tar.gz -C release/darwin/amd64 gitploy
24
+ tar -cvzf release/gitploy_darwin_arm64.tar.gz -C release/darwin/arm64 gitploy
25
+
26
+ # generate shas for tar files
27
+ sha256sum release/* .tar.gz > release/gitploy_checksums.txt
You can’t perform that action at this time.
0 commit comments