Skip to content

Merge pull request #14 from mamezou-tech/dependabot/go_modules/golang… #80

Merge pull request #14 from mamezou-tech/dependabot/go_modules/golang…

Merge pull request #14 from mamezou-tech/dependabot/go_modules/golang… #80

Workflow file for this run

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 }}