File tree Expand file tree Collapse file tree 3 files changed +30
-6
lines changed
Expand file tree Collapse file tree 3 files changed +30
-6
lines changed Original file line number Diff line number Diff line change 88jobs :
99 build :
1010 name : Build
11- runs-on : macos-10.15
11+ runs-on : ubuntu-20.04
1212 steps :
1313 - name : Set up Go 1.13
1414@@ -17,14 +17,29 @@ jobs:
1717 id : go
1818 - name : Check out code into the Go module directory
191920+ - name : Upgrade upx
21+ run : |
22+ # try to fix https://github.com/jenkins-zh/jenkins-cli/issues/493
23+ wget https://github.com/upx/upx/releases/download/v3.96/upx-3.96-amd64_linux.tar.xz
24+ tar xvf upx-3.96-amd64_linux.tar.xz
25+ upx-3.96-amd64_linux/upx -V
26+ sudo mv upx-3.96-amd64_linux/upx $(which upx)
27+ upx -V
2028 - name : Run GoReleaser
2129 uses :
goreleaser/[email protected] 2230 with :
2331 version : latest
24- args : check
25- - name : Build
26- run : |
27- go build
32+ args : release --skip-publish --rm-dist
33+ - name : Upload Artifact for darwin
34+ uses : actions/upload-artifact@v2
35+ with :
36+ name : jcli-darwin-amd64
37+ path : release/jcli-darwin-amd64.tar.gz
38+ - name : Upload Artifact for linux
39+ uses : actions/upload-artifact@v2
40+ with :
41+ name : jcli-linux-amd64
42+ path : release/jcli-linux-amd64.tar.gz
2843 GoLint :
2944 name : Lint
3045 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 77
88jobs :
99 goreleaser :
10- runs-on : ubuntu-latest
10+ runs-on : ubuntu-20.04
1111 steps :
1212 - name : Checkout
131317171818 with :
1919 go-version : 1.13.x
20+ - name : Upgrade upx
21+ run : |
22+ # try to fix https://github.com/jenkins-zh/jenkins-cli/issues/493
23+ wget https://github.com/upx/upx/releases/download/v3.96/upx-3.96-amd64_linux.tar.xz
24+ tar xvf upx-3.96-amd64_linux.tar.xz
25+ upx-3.96-amd64_linux/upx -V
26+ sudo mv upx-3.96-amd64_linux/upx $(which upx)
27+ upx -V
2028 - name : Run GoReleaser
2129 uses :
goreleaser/[email protected] 2230 with :
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ builds:
1919 - -X github.com/linuxsuren/cobra-extension/version.commit={{.ShortCommit}}
2020 - -X github.com/linuxsuren/cobra-extension/version.date={{.Date}}
2121 - -w
22+ - -s
2223dist : release
2324archives :
2425- name_template : " {{ .Binary }}-{{ .Os }}-{{ .Arch }}"
You can’t perform that action at this time.
0 commit comments