45 lines
No EOL
893 B
YAML
45 lines
No EOL
893 B
YAML
name: Go
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
|
|
- name: Set up Go 1.x
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: ^1.14
|
|
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: '0'
|
|
|
|
- name: Build
|
|
run: |
|
|
GOOS=linux make build
|
|
GOOS=darwin make build
|
|
GOOS=windows EXTENSION=.exe make build
|
|
|
|
- name: Install fpm
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y rpm ruby ruby-dev
|
|
sudo gem install fpm
|
|
|
|
- name: Package
|
|
run: make package-deb package-rpm
|
|
|
|
- name: Upload Artifact
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: dist
|
|
path: dist/*
|
|
retention-days: 14 |