--- name: catsync-build on: push: paths: - '.gitea/workflows/build.yml' - 'go.mod' - 'go.sum' - 'main.go' - 'assets/**' - 'pb/**' pull_request: paths: - '.gitea/workflows/build.yml' - 'go.mod' - 'go.sum' - 'main.go' - 'assets/**' - 'pb/**' concurrency: group: ${{ github.workflow_ref }} cancel-in-progress: true jobs: build: name: simple-build runs-on: ubuntu-20.04 strategy: matrix: goos: [linux, windows] goarch: [amd64, arm64] gover: ['1.23.1', 'oldstable'] exclude: - goarch: arm64 goos: windows steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v3 with: go-version: ${{ matrix.gover }} - name: install-tools run: | apt-get update -y apt-get install -y protobuf-compiler go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.36.0 - name: protobuf-gen run: | protoc --go_out=. ./assets/protobuf/*.proto - name: build run: | GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -x .