exclude arm windows

This commit is contained in:
Ben Sarmiento
2023-10-28 22:00:25 +02:00
parent c28dc0bf46
commit c629f1c2dd

View File

@@ -7,6 +7,7 @@ on:
tags: tags:
- v0* - v0*
- latest - latest
jobs: jobs:
build: build:
name: Build name: Build
@@ -32,18 +33,24 @@ jobs:
- name: Build - name: Build
run: | run: |
CGO_ENABLED=0 GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -ldflags="-s -w" -o zurg-${{ matrix.goos }}-${{ matrix.goarch }} cmd/zurg/main.go CGO_ENABLED=0 GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -ldflags="-s -w" -o zurg-v${GITHUB_REF#refs/tags/}-${{ matrix.goos }}-${{ matrix.goarch }} cmd/zurg/main.go
# Install and use UPX to compress the binary # Install and use UPX to compress the binary, but exclude windows/amd64
- name: Install and Compress with UPX - name: Install and Compress with UPX
if: (matrix.goos != 'windows' && matrix.goarch != 'arm') || (matrix.goos != 'windows' && matrix.goarch != 'arm64')
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install -y upx-ucl sudo apt-get install -y upx-ucl
upx --best zurg-${{ matrix.goos }}-${{ matrix.goarch }} upx --best zurg-v${GITHUB_REF#refs/tags/}-${{ matrix.goos }}-${{ matrix.goarch }}
# Zip the binary
- name: Zip Binary
run: |
zip zurg-v${GITHUB_REF#refs/tags/}-${{ matrix.goos }}-${{ matrix.goarch }}.zip zurg-v${GITHUB_REF#refs/tags/}-${{ matrix.goos }}-${{ matrix.goarch }}
- name: Upload Artifacts - name: Upload Artifacts
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: zurg-${{ matrix.goos }}-${{ matrix.goarch }} name: zurg-v${GITHUB_REF#refs/tags/}-${{ matrix.goos }}-${{ matrix.goarch }}.zip
path: | path: |
zurg-${{ matrix.goos }}-${{ matrix.goarch }} zurg-v${GITHUB_REF#refs/tags/}-${{ matrix.goos }}-${{ matrix.goarch }}.zip