2021-03-18 23:41:25 +01:00
|
|
|
name: Go
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ main ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ main ]
|
2021-03-20 19:16:27 +01:00
|
|
|
release:
|
|
|
|
types: [ created ]
|
2021-03-18 23:41:25 +01:00
|
|
|
|
|
|
|
jobs:
|
2021-03-20 19:16:27 +01:00
|
|
|
releases-matrix:
|
|
|
|
name: Release Go Binary
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
goos: [linux, windows, darwin, freebsd, openbsd, netbsd]
|
|
|
|
goarch: ["386", amd64]
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: wangyoucao577/go-release-action@v1.15
|
|
|
|
with:
|
|
|
|
goos: ${{ matrix.goos }}
|
|
|
|
goarch: ${{ matrix.goarch }}
|
2021-03-18 23:41:25 +01:00
|
|
|
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
|
|
|
go-version: 1.15
|
|
|
|
|
|
|
|
- name: Build
|
2021-03-20 19:16:27 +01:00
|
|
|
run: go build -v ./...
|
2021-03-18 23:41:25 +01:00
|
|
|
|
|
|
|
- name: Test
|
2021-03-20 19:16:27 +01:00
|
|
|
run: go test -v ./...
|