File tree Expand file tree Collapse file tree 4 files changed +34
-7
lines changed Expand file tree Collapse file tree 4 files changed +34
-7
lines changed Original file line number Diff line number Diff line change 1+ name : Backup Git repository
2+
3+ on :
4+ workflow_dispatch :
5+ push :
6+ branches :
7+ - master
8+
9+ jobs :
10+ BackupGit :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/checkout@v1
14+ - name : Backup to Gitee
15+ uses :
jenkins-zh/[email protected] 16+ env :
17+ GIT_DEPLOY_KEY : ${{ secrets.GIT_DEPLOY_KEY }}
18+ TARGET_GIT :
" [email protected] :jenkins-zh/jcli-ishell-plugin.git" 19+ - name : Backup to CodeChina
20+ uses :
jenkins-zh/[email protected] 21+ env :
22+ GIT_DEPLOY_KEY : ${{ secrets.GIT_DEPLOY_KEY }}
23+ TARGET_GIT :
" [email protected] :jenkins-zh/jcli-ishell-plugin.git"
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-latest
1212 steps :
1313 - name : Set up Go 1.13
14142424 args : check
2525 - name : Build
2626 run : |
27+ export PATH=$PATH:${PWD}/upx-3.96-amd64_linux
28+ curl -L https://github.com/upx/upx/releases/download/v3.96/upx-3.96-amd64_linux.tar.xz | tar xJ
29+ upx -V
2730 make build
2831 - name : Test
2932 run : |
Original file line number Diff line number Diff line change @@ -8,17 +8,17 @@ builds:
88 - amd64
99 - arm64
1010 goos :
11- - freebsd
1211 - windows
1312 - linux
1413 - darwin
15- ignore :
16- - goos : freebsd
17- goarch : arm64
14+ hooks :
15+ post :
16+ - upx "{{ .Path }}"
1817 ldflags :
1918 - -X github.com/jenkins-zh/jenkins-cli/app.version={{.Version}}
2019 - -X github.com/jenkins-zh/jenkins-cli/app.commit={{.ShortCommit}}
2120 - -X github.com/jenkins-zh/jenkins-cli/app.date={{.Date}}
21+ - -w
2222dist : release
2323archives :
2424- name_template : " {{ .Binary }}-{{ .Os }}-{{ .Arch }}"
@@ -30,9 +30,9 @@ archives:
3030 arm64 : arm64
3131 format_overrides :
3232 - goos : windows
33- format : zipREADME.md
33+ format : zip
3434 files :
35- -
35+ - README.md
3636checksum :
3737 name_template : ' checksums.txt'
3838snapshot :
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ NAME := jcli-ishell-plugin
22
33build :
44 go build
5+ upx $(NAME )
56 chmod u+x $(NAME )
67
78copy : build
You can’t perform that action at this time.
0 commit comments