-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (42 loc) · 1.1 KB
/
release.yaml
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
46
47
48
49
50
name: Release
on:
push:
tags:
- "*.*.*"
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: '1.18.x'
- name: Build Linux
env:
GOOS: linux
GOARCH: amd64
run: |
go build -o kubot-${{ github.ref_name }}-linux-amd64 kubot.go
- name: Build MacOS
env:
GOOS: darwin
GOARCH: amd64
run: |
go build -o kubot-${{ github.ref_name }}-darwin-amd64 kubot.go
- name: Build Windows
env:
GOOS: windows
GOARCH: amd64
run: |
go build -o kubot-${{ github.ref_name }}-win-amd64.exe kubot.go
- name: Release
uses: softprops/action-gh-release@v1
with:
# note you'll typically need to create a personal access token
# with permissions to create releases in the other repo
files: kubot-*
token: ${{ secrets.GITHUB_TOKEN }}