diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 281460e..8a8c605 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -10,21 +10,8 @@ permissions: jobs: build: - name: Build ${{ matrix.goos }}-${{ matrix.goarch }} + name: Build binaries runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - include: - - goos: linux - goarch: amd64 - suffix: "" - - goos: darwin - goarch: amd64 - suffix: "" - - goos: windows - goarch: amd64 - suffix: .exe steps: - name: Check out source @@ -42,14 +29,31 @@ jobs: - name: Build env: CGO_ENABLED: "0" - GOOS: ${{ matrix.goos }} - GOARCH: ${{ matrix.goarch }} - run: go build -trimpath -ldflags="-s -w" -o "dist/simplegit-${GOOS}-${GOARCH}${{ matrix.suffix }}" ./cmd + run: | + GOOS=linux GOARCH=amd64 go build -trimpath -ldflags="-s -w" -o dist/simplegit-linux-amd64 ./cmd + GOOS=darwin GOARCH=amd64 go build -trimpath -ldflags="-s -w" -o dist/simplegit-darwin-amd64 ./cmd + GOOS=windows GOARCH=amd64 go build -trimpath -ldflags="-s -w" -o dist/simplegit-windows-amd64.exe ./cmd - - name: Upload binary + - name: Upload Linux binary uses: actions/upload-artifact@v4 with: - name: simplegit-${{ matrix.goos }}-${{ matrix.goarch }} - path: dist/simplegit-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.suffix }} + name: simplegit-linux-amd64 + path: dist/simplegit-linux-amd64 + if-no-files-found: error + retention-days: 14 + + - name: Upload macOS binary + uses: actions/upload-artifact@v4 + with: + name: simplegit-darwin-amd64 + path: dist/simplegit-darwin-amd64 + if-no-files-found: error + retention-days: 14 + + - name: Upload Windows binary + uses: actions/upload-artifact@v4 + with: + name: simplegit-windows-amd64 + path: dist/simplegit-windows-amd64.exe if-no-files-found: error retention-days: 14