-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (58 loc) · 1.58 KB
/
main.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
51
52
53
54
55
56
57
58
59
60
61
name: CI
on: [push, pull_request]
env:
GO_VERSION: '~1.21'
GO_STABLE: 'true'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
stable: ${{ env.GO_STABLE }}
go-version: ${{ env.GO_VERSION }}
- name: Run 'make lint'
run: make lint
test:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: false
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
stable: ${{ env.GO_STABLE }}
go-version: ${{ env.GO_VERSION }}
- name: Run 'make testdeps'
run: make testdeps
- name: Run 'make test'
run: make test
build:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v2
with:
stable: ${{ env.GO_STABLE }}
go-version: ${{ env.GO_VERSION }}
- name: Install gogenlicense
run: go install github.com/tkw1536/gogenlicense/cmd/gogenlicense@latest
- name: Install lipo
run: go install github.com/tkw1536/[email protected]
- uses: actions/checkout@v2
- name: Run 'make generate'
run: |
export PATH=$PATH:$(go env GOPATH)/bin
make generate
- name: Run 'make all'
run: make all
- name: Upload Releases
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
dist/ggman
dist/ggman_mac
dist/ggman.exe