change build format

This commit is contained in:
Ben Sarmiento
2023-10-28 22:24:59 +02:00
parent c1a7c48e04
commit 5ea1769542

View File

@@ -41,7 +41,7 @@ jobs:
- name: Build - name: Build
run: | run: |
CGO_ENABLED=0 GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -ldflags="-s -w" -o zurg-v${BUILD_VERSION}-${{ matrix.goos }}-${{ matrix.goarch }} cmd/zurg/main.go CGO_ENABLED=0 GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -ldflags="-s -w" -o zurg-${BUILD_VERSION}-${{ matrix.goos }}-${{ matrix.goarch }} cmd/zurg/main.go
# Install and use UPX to compress the binary, but exclude specific combinations # Install and use UPX to compress the binary, but exclude specific combinations
- name: Install and Compress with UPX - name: Install and Compress with UPX
@@ -49,12 +49,12 @@ jobs:
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-v${BUILD_VERSION}-${{ matrix.goos }}-${{ matrix.goarch }} upx --best zurg-${BUILD_VERSION}-${{ matrix.goos }}-${{ matrix.goarch }}
# Zip the binary # Zip the binary
- name: Zip Binary - name: Zip Binary
run: | run: |
zip zurg-v${BUILD_VERSION}-${{ matrix.goos }}-${{ matrix.goarch }}.zip zurg-v${BUILD_VERSION}-${{ matrix.goos }}-${{ matrix.goarch }} zip zurg-${BUILD_VERSION}-${{ matrix.goos }}-${{ matrix.goarch }}.zip zurg-${BUILD_VERSION}-${{ matrix.goos }}-${{ matrix.goarch }}
# List files (for debugging) # List files (for debugging)
- name: List files - name: List files
@@ -63,5 +63,5 @@ jobs:
- name: Upload Artifacts - name: Upload Artifacts
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: zurg-v${BUILD_VERSION}-${{ matrix.goos }}-${{ matrix.goarch }}.zip name: zurg-${BUILD_VERSION}-${{ matrix.goos }}-${{ matrix.goarch }}.zip
path: zurg-v${BUILD_VERSION}-${{ matrix.goos }}-${{ matrix.goarch }}.zip path: zurg-${BUILD_VERSION}-${{ matrix.goos }}-${{ matrix.goarch }}.zip