Merge pull request #13 from mamezou-tech/feature/add-extract-command #77
Workflow file for this run
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: Go | |
on: | |
push: | |
paths-ignore: | |
- README.md | |
- LICENSE | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.22 | |
id: go | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
- name: Build | |
run: | | |
GOOS=linux GOARCH=amd64 go build -o build/linux/sbgraph main.go | |
GOOS=windows GOARCH=amd64 go build -o build/windows/sbgraph.exe main.go | |
GOOS=darwin GOARCH=amd64 go build -o build/macos/sbgraph main.go | |
- name: Archive | |
if: startsWith(github.ref, 'refs/tags/') | |
run: | | |
(cd build/linux && tar cfvz ../sbgraph-linux-amd64.tar.gz sbgraph) | |
(cd build/windows && tar cfvz ../sbgraph-windows-amd64.tar.gz sbgraph.exe) | |
(cd build/macos && tar cfvz ../sbgraph-darwin-amd64.tar.gz sbgraph) | |
- name: Publish | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: build/*.tar.gz | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} |