Skip to content

Commit

Permalink
chore(ci): try compressed binary
Browse files Browse the repository at this point in the history
  • Loading branch information
heronimus committed Oct 19, 2023
1 parent 45fab4b commit a1fa34e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,24 @@ jobs:
go-version: ${{ matrix.go-version }}
cache-dependency-path: "go.sum"
- name: Build ${{ matrix.goos }}/${{ matrix.goarch }}
id: build
run: |
output_name=world-cli_${{ matrix.goos }}_${{ matrix.goarch }}
[ ${{ matrix.goos }} = "windows" ] && output_name+=".exe"
env GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o $output_name
echo "output_name=$output_name" >> $GITHUB_OUTPUT
- name: Compress Build Binary
uses: a7ul/[email protected]
id: compress
with:
command: c
files: |
./${{ steps.build.outputs.output_name }}
outPath: ${{ steps.build.outputs.output_name }}.tar.gz
- name: Upload binary to Github artifact
if: ${{ inputs.create_release }}
uses: actions/upload-artifact@v3
with:
name: world-cli-${{ matrix.goos }}-${{ matrix.goarch }}
path: ./world-cli*
path: ./world-cli*.tar.gz

0 comments on commit a1fa34e

Please sign in to comment.