51 lines
1.1 KiB
YAML
51 lines
1.1 KiB
YAML
|
---
|
||
|
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 }}-${{ github.ref }}
|
||
|
cancel-in-progress: true
|
||
|
|
||
|
jobs:
|
||
|
build:
|
||
|
name: simple-build
|
||
|
runs-on: ubuntu-20.04
|
||
|
strategy:
|
||
|
matrix:
|
||
|
goos: [linux, windows, drawin]
|
||
|
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
|
||
|
- name: protobuf-gen
|
||
|
run: |
|
||
|
protoc --go_out=. ./assets/protobuf/*.proto
|
||
|
- name: build
|
||
|
run: |
|
||
|
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -x .
|
||
|
|