Skip to content

feat: update sbgraph (#16) #49

feat: update sbgraph (#16)

feat: update sbgraph (#16) #49

Workflow file for this run

name: Go
on: [push]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Run tests
run: go test -v github.com/kondoumh/sb2md/cmd
- name: Run cmd
run: go run main.go kondoumh/Dev
- name: Build
run: |
GOOS=linux GOARCH=amd64 go build -o build/linux-amd64/sb2md main.go
GOOS=linux GOARCH=arm64 go build -o build/linux-arm64/sb2md main.go
GOOS=windows GOARCH=amd64 go build -o build/windows/sb2md.exe main.go
GOOS=darwin GOARCH=amd64 go build -o build/macos/sb2md main.go
GOOS=darwin GOARCH=arm64 go build -o build/macos_arm/sb2md main.go
- name: Archive
if: startsWith(github.ref, 'refs/tags/')
run: |
(cd build/linux-amd64 && tar cfvz ../sb2md-linux-amd64.tar.gz sb2md)
(cd build/linux-arm64 && tar cfvz ../sb2md-linux-arm64.tar.gz sb2md)
(cd build/windows && tar cfvz ../sb2md-windows-amd64.tar.gz sb2md.exe)
(cd build/macos && tar cfvz ../sb2md-darwin-amd64.tar.gz sb2md)
(cd build/macos_arm && tar cfvz ../sb2md-darwin-arm64.tar.gz sb2md)
- name: Publish
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: build/*.tar.gz