From b0cf501782ecbd532fc60bf07e131b3e723658e2 Mon Sep 17 00:00:00 2001 From: John Guo Date: Tue, 8 Mar 2022 20:28:18 +0800 Subject: [PATCH] ci updates --- .github/workflows/cli.yml | 30 ++---------------------------- 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index 5019ddc0b..49c660a28 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -9,7 +9,6 @@ on: env: TZ: Asia/Shanghai - jobs: build: name: Build And Release @@ -30,37 +29,12 @@ jobs: GOOS=linux GOARCH=amd64 go build main.go chmod +x main ./main install -y - - # gf build + - name: Build CLI Binary For All Platform run: | cd cmd/gf gf build main.go -n gf -a all -s all - - # 处理gf-cli批量编译后的文件结构 - - name: Move Files Before Upx - run: | - cd cmd/gf/bin - for OS in *;do for FILE in $OS/*;\ - do if [[ ${OS} =~ 'windows' ]];\ - then rm -rf noupx && mkdir noupx && mv $FILE noupx/gf_$OS.exe && rm -rf $OS;\ - else mv $FILE gf_$OS && rm -rf $OS;\ - fi;done;done - # UPX 加壳所有文件 - - name: Upx All Binary - uses: gacts/upx@master - with: - dir: 'cmd/gf/bin' - upx_args: '-9' - - # 移动未UPX的windows程序到上传bin目录下 - - name: Move Files After Upx - run: | - cd cmd/gf/bin - mv noupx/* ./ && rm -rf noupx - ls -l - - name: Create Github Release id: create_release uses: actions/create-release@v1 @@ -78,4 +52,4 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - asset_paths: '["cmd/gf/bin/gf_*"]' + asset_paths: '["cmd/gf/temp/gf_*"]'