Add build action #1
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
name: Build All | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: '>=1.21.0' | |
- run: go version | |
- name: GoReSym Build | |
run: | | |
export GOOS=linux | |
go build && mv GoReSym GoReSym_lin | |
export GOOS=windows | |
go build && mv GoReSym.exe GoReSym_win.exe | |
export GOOS=darwin | |
go build && mv GoReSym GoReSym_mac | |
export GOOS=linux | |
- name: Zip Build | |
run: | | |
Compress-Archive -DestinationPath GoReSym.zip -LiteralPath ./GoReSym_lin, ./GoReSym_win.exe, ./GoReSym_mac -CompressionLevel Fastest | |
- name: Release | |
uses: softprops/[email protected] | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: GoReSym.zip |