未验证 提交 eceb450f 编写于 作者: LinuxSuRen's avatar LinuxSuRen 提交者: GitHub

Reduce the binary file size by upx (#7)

* Reduce the binary file size by upx

* Fix the compress format issues

* Use tar xJ to uncompress tar file

* Backup git repo
上级 8d16b495
name: Backup Git repository
on:
workflow_dispatch:
push:
branches:
- master
jobs:
BackupGit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Backup to Gitee
uses: jenkins-zh/git-backup-actions@v0.0.3
env:
GIT_DEPLOY_KEY: ${{ secrets.GIT_DEPLOY_KEY }}
TARGET_GIT: "git@gitee.com:jenkins-zh/jcli-ishell-plugin.git"
- name: Backup to CodeChina
uses: jenkins-zh/git-backup-actions@v0.0.4
env:
GIT_DEPLOY_KEY: ${{ secrets.GIT_DEPLOY_KEY }}
TARGET_GIT: "git@codechina.csdn.net:jenkins-zh/jcli-ishell-plugin.git"
\ No newline at end of file
......@@ -8,7 +8,7 @@ on:
jobs:
build:
name: Build
runs-on: macos-10.15
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.13
uses: actions/setup-go@v2.1.3
......@@ -24,6 +24,9 @@ jobs:
args: check
- name: Build
run: |
export PATH=$PATH:${PWD}/upx-3.96-amd64_linux
curl -L https://github.com/upx/upx/releases/download/v3.96/upx-3.96-amd64_linux.tar.xz | tar xJ
upx -V
make build
- name: Test
run: |
......
......@@ -8,17 +8,17 @@ builds:
- amd64
- arm64
goos:
- freebsd
- windows
- linux
- darwin
ignore:
- goos: freebsd
goarch: arm64
hooks:
post:
- upx "{{ .Path }}"
ldflags:
- -X github.com/jenkins-zh/jenkins-cli/app.version={{.Version}}
- -X github.com/jenkins-zh/jenkins-cli/app.commit={{.ShortCommit}}
- -X github.com/jenkins-zh/jenkins-cli/app.date={{.Date}}
- -w
dist: release
archives:
- name_template: "{{ .Binary }}-{{ .Os }}-{{ .Arch }}"
......@@ -30,9 +30,9 @@ archives:
arm64: arm64
format_overrides:
- goos: windows
format: zipREADME.md
format: zip
files:
-
- README.md
checksum:
name_template: 'checksums.txt'
snapshot:
......
......@@ -2,6 +2,7 @@ NAME := jcli-ishell-plugin
build:
go build
upx $(NAME)
chmod u+x $(NAME)
copy: build
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册