clash/.github/workflows/go.yml

37 lines
800 B
YAML
Raw Normal View History

2019-08-15 03:40:40 +00:00
name: Go
on: [push, pull_request]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
2019-10-14 02:40:00 +00:00
- name: Setup Go
2019-08-15 03:40:40 +00:00
uses: actions/setup-go@v1
with:
2019-10-14 02:40:00 +00:00
go-version: 1.13.x
2019-08-15 03:40:40 +00:00
- name: Check out code into the Go module directory
uses: actions/checkout@v1
- name: Get dependencies
run: |
go test ./...
2019-10-14 02:40:00 +00:00
- name: Build
if: startsWith(github.ref, 'refs/tags/')
env:
NAME: clash
BINDIR: bin
run: make -j releases
- name: Upload Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: bin/*
draft: true
prerelease: true