mirror of
https://github.com/wweir/sower.git
synced 2024-04-21 12:42:15 +00:00
64 lines
2.2 KiB
YAML
64 lines
2.2 KiB
YAML
name: Go
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
jobs:
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v1
|
|
|
|
- name: Set up Go Build Environment
|
|
uses: actions/setup-go@v1
|
|
with:
|
|
go-version: 1.13
|
|
id: go
|
|
|
|
- name: Prepare Scripts
|
|
run: |
|
|
cp conf/sower.toml .
|
|
cp -r .github/* .
|
|
|
|
- name: build matrix
|
|
run: |
|
|
GOOS=linux GOARCH=amd64 make build
|
|
tar czvf sower-linux-amd64.tar.gz sower sower.toml sower-client.service sower-server.service
|
|
GOOS=linux GOARCH=386 make build
|
|
tar czvf sower-linux-386.tar.gz sower sower.toml sower-client.service sower-server.service
|
|
GOOS=linux GOARCH=arm make build
|
|
tar czvf sower-linux-arm.tar.gz sower sower.toml sower-client.service sower-server.service
|
|
GOOS=linux GOARCH=arm64 make build
|
|
tar czvf sower-linux-arm64.tar.gz sower sower.toml sower-client.service sower-server.service
|
|
GOOS=linux GOARCH=mips make build
|
|
tar czvf sower-linux-mips.tar.gz sower sower.toml sower-client.service sower-server.service
|
|
GOOS=linux GOARCH=mipsle make build
|
|
tar czvf sower-linux-mipsle.tar.gz sower sower.toml sower-client.service sower-server.service
|
|
|
|
GOOS=darwin GOARCH=amd64 make build
|
|
tar czvf sower-darwin-amd64.tar.gz sower sower.toml cc.wweir.sower.plist
|
|
|
|
GOOS=windows GOARCH=amd64 make build
|
|
tar czvf sower-windows-amd64.tar.gz sower.exe sower.toml
|
|
GOOS=windows GOARCH=386 make build
|
|
tar czvf sower-windows-386.tar.gz sower.exe sower.toml
|
|
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v1
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
with:
|
|
files: |
|
|
sower-linux-amd64.tar.gz
|
|
sower-linux-386.tar.gz
|
|
sower-linux-arm.tar.gz
|
|
sower-linux-arm64.tar.gz
|
|
sower-linux-mips.tar.gz
|
|
sower-linux-mipsle.tar.gz
|
|
sower-darwin-amd64.tar.gz
|
|
sower-windows-amd64.tar.gz
|
|
sower-windows-386.tar.gz
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|