-
Notifications
You must be signed in to change notification settings - Fork 5
70 lines (68 loc) · 1.55 KB
/
release.yml
File metadata and controls
70 lines (68 loc) · 1.55 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: release
on:
push:
tags:
- "v*.*.*"
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.18'
- name: Build
run: make build
- name: Test
run: |
go install github.com/onsi/ginkgo/v2/ginkgo@latest
make test
build:
runs-on: ubuntu-latest
needs: [test]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18
- name: Build binaries
run: make release
- name: Store binaries
uses: actions/upload-artifact@v2
with:
name: hammertime-binaries
path: bin/*
retention-days: 1
release:
runs-on: ubuntu-latest
needs: [test, build]
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Download binaries
uses: actions/download-artifact@v2
with:
name: hammertime-binaries
path: bin
- name: Release
uses: softprops/action-gh-release@v1
with:
prerelease: false
draft: true
fail_on_unmatched_files: true
generate_release_notes: true
files: |
bin/hammertime-darwin-amd64
bin/hammertime-darwin-arm64
bin/hammertime-linux-amd64
bin/hammertime-linux-arm64
bin/hammertime-windows-amd64
bin/hammertime-windows-arm64