-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (38 loc) · 932 Bytes
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
on:
push:
tags:
- '*'
branches:
- '*'
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.18.x'
- env:
GO111MODULE: on
run: go test
build_publish:
needs: tests
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') # run only on tags
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.18.x'
- name: build
env:
CGO_ENABLED: 0
GO111MODULE: on
run: go build -o botassasin
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: botassasin
asset_name: botassasin
tag: ${{ github.ref }}