op_annotate updated, minor fix #66
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 Build, Test and Publish Artifacts | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
target: [linux, windows] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '>=1.22.3' | |
- name: Test | |
run: go test -v ./... | |
- name: Build linux amd64 binaries | |
if: matrix.target == 'linux' | |
run: env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -x -buildvcs=true -ldflags "-s -w" -o Perpetual_amd64.bin github.com/DarkCaster/Perpetual | |
- name: Build linux arm64 binaries | |
if: matrix.target == 'linux' | |
run: env CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -v -x -buildvcs=true -ldflags "-s -w" -o Perpetual_arm64.bin github.com/DarkCaster/Perpetual | |
- name: Build linux x86 binaries | |
if: matrix.target == 'linux' | |
run: env CGO_ENABLED=0 GOOS=linux GOARCH=386 go build -v -x -buildvcs=true -ldflags "-s -w" -o Perpetual_x86.bin github.com/DarkCaster/Perpetual | |
- name: Build windows amd64 binaries | |
if: matrix.target == 'windows' | |
run: env CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -v -x -buildvcs=true -ldflags "-s -w" -o Perpetual_amd64.exe github.com/DarkCaster/Perpetual | |
- name: Build windows arm64 binaries | |
if: matrix.target == 'windows' | |
run: env CGO_ENABLED=0 GOOS=windows GOARCH=arm64 go build -v -x -buildvcs=true -ldflags "-s -w" -o Perpetual_arm64.exe github.com/DarkCaster/Perpetual | |
- name: Build windows x86 binaries | |
if: matrix.target == 'windows' | |
run: env CGO_ENABLED=0 GOOS=windows GOARCH=386 go build -v -x -buildvcs=true -ldflags "-s -w" -o Perpetual_x86.exe github.com/DarkCaster/Perpetual | |
- name: Upload linux artifacts | |
if: matrix.target == 'linux' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux-binaries | |
path: | | |
Perpetual_*.bin | |
- name: Upload windows artifacts | |
if: matrix.target == 'windows' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: windows-binaries | |
path: | | |
Perpetual_*.exe |