build: add on-commit github action
This commit is contained in:
parent
da544e8176
commit
80497fb2a8
37
.github/workflows/build.yaml
vendored
Normal file
37
.github/workflows/build.yaml
vendored
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
name: build abyss
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
goos: [linux]
|
||||||
|
goarch: [amd64, arm64, riscv64, ppc64le]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: set up go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: 1.22.x
|
||||||
|
|
||||||
|
- name: build for ${{ matrix.goarch }}
|
||||||
|
run: |
|
||||||
|
export CGO_ENABLED=0
|
||||||
|
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -a -ldflags '-extldflags "-static"' -o abyss-${{ matrix.goarch }}
|
||||||
|
|
||||||
|
- name: upload binaries
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: abyss-${{ matrix.goarch }}
|
||||||
|
path: abyss-${{ matrix.goarch }}
|
Loading…
Reference in New Issue
Block a user