-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (37 loc) · 903 Bytes
/
release.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
46
name: Create Release
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
- name: Generate
run: go generate .
- name: Build linux-amd64
env:
GOOS: linux
GOARCH: amd64
run: go build -v -ldflags='-s -w' -o reboot_watcher.linux.amd64 .
- name: Build darwin-arm64
env:
GOOS: darwin
GOARCH: arm64
run: go build -v -ldflags='-s -w' -o reboot_watcher.darwin.arm64 .
- name: Checksums
run: sha256sum reboot_watcher.* > sha256sums.txt
- name: Test
run: go test -v ./...
- name: Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
files: |
sha256sums.txt
reboot_watcher.*