-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (36 loc) · 995 Bytes
/
build.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
40
41
42
43
44
45
name: CI
on:
push:
branches: [ main ]
tags: ['v*.*.*']
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
- name: Test
run: go test -v
- name: Build linux arm
run: env GOOS=linux GOARCH=arm go build -o build/rpi_radio_alarm_telegrambot_arm
- name: Build linux 64
run: env GOOS=linux GOARCH=amd64 go build -o build/rpi_radio_alarm_telegrambot_64
- name: Upload Binaries
uses: actions/upload-artifact@v1
with:
name: bins
path: build/
- name: Add binaries to release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
with:
files: |
build/rpi_radio_alarm_telegrambot_arm
build/rpi_radio_alarm_telegrambot_64