Merge pull request #11 from program--/jsm-patch-3 #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- main | |
paths: | |
- cli/**.go | |
- '.github/workflows/Generate-subset-app.yaml' | |
workflow_dispatch: | |
name: Build and Upload hfsubset Executables | |
jobs: | |
generate: | |
name: Generate cross-platform builds | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Golang | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: 'cli/go.mod' | |
- name: Package MacOS executable | |
working-directory: ./cli | |
run: | | |
GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -o hfsubset | |
tar -czvf hfsubset-macos_amd64.tar.gz hfsubset | |
rm hfsubset | |
- name: Package Linux executable | |
working-directory: ./cli | |
run: | | |
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o hfsubset | |
tar -czvf hfsubset-linux_amd64.tar.gz hfsubset | |
rm hfsubset | |
- name: Package Windows executable | |
working-directory: ./cli | |
run: | | |
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -o hfsubset | |
zip hfsubset-windows_amd64.zip hfsubset.exe | |
rm hfsubset.exe | |
- name: Upload packages | |
uses: ncipollo/release-action@v1 | |
with: | |
tag: hfsubset-release-${{ github.run_number }} | |
commit: ${{ github.sha }} | |
artifacts: "cli/hfsubset-*" |