Skip to content

Commit f87e474

Browse files
authored
bump upx (#21)
* Add more lables * Bump the upx version to 3.96
1 parent fbbb2c2 commit f87e474

File tree

3 files changed

+30
-6
lines changed

3 files changed

+30
-6
lines changed

.github/workflows/pull-request.yaml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
jobs:
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
uses: actions/[email protected]
@@ -17,14 +17,29 @@ jobs:
1717
id: go
1818
- name: Check out code into the Go module directory
1919
uses: actions/[email protected]
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:
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

.github/workflows/release.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
goreleaser:
10-
runs-on: ubuntu-latest
10+
runs-on: ubuntu-20.04
1111
steps:
1212
- name: Checkout
1313
uses: actions/[email protected]
@@ -17,6 +17,14 @@ jobs:
1717
uses: actions/[email protected]
1818
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:

.goreleaser.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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
2223
dist: release
2324
archives:
2425
- name_template: "{{ .Binary }}-{{ .Os }}-{{ .Arch }}"

0 commit comments

Comments
 (0)