-
Notifications
You must be signed in to change notification settings - Fork 7
95 lines (88 loc) · 2.51 KB
/
go.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: Go Generate, Build and Test
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
js:
name: Build & Test JavaScript
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: yarn
cache-dependency-path: js/yarn.lock
- run: yarn install --frozen-lockfile
working-directory: ./js
- name: Test JavaScript
run: yarn test
working-directory: ./js
- name: Webpack Build
run: yarn build
working-directory: ./js
go:
name: Build & Test Go. Create CLI Artifacts.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 17
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Generate
run: go generate -v ./...
working-directory: ./go
- name: Build
run: go build -v ./...
working-directory: ./go
- name: Test
run: go test -v ./...
working-directory: ./go
- name: Generate darwin/amd64
working-directory: ./go
run: env GOOS=darwin GOARCH=amd64 go build -o ../dist/ ./cmd/qtag
- name: Archive darwin/amd64
uses: actions/upload-artifact@v3
with:
name: qtag-darwin-amd64
path: ./dist/qtag
- name: Generate darwin/arm64
working-directory: ./go
run: env GOOS=darwin GOARCH=arm64 go build -o ../dist/ ./cmd/qtag
- name: Archive darwin/arm64
uses: actions/upload-artifact@v3
with:
name: qtag-darwin-arm64
path: ./dist/qtag
- name: Generate windows/amd64
working-directory: ./go
run: env GOOS=windows GOARCH=amd64 go build -o ../dist/ ./cmd/qtag
- name: Archive windows/amd64
uses: actions/upload-artifact@v3
with:
name: qtag-windows-amd64
path: ./dist/qtag
- name: Generate linux/amd64
working-directory: ./go
run: env GOOS=linux GOARCH=amd64 go build -o ../dist/ ./cmd/qtag
- name: Archive linux/amd64
uses: actions/upload-artifact@v3
with:
name: qtag-linux-amd64
path: ./dist/qtag
- name: Generate linux/arm64
working-directory: ./go
run: env GOOS=linux GOARCH=arm64 go build -o ../dist/ ./cmd/qtag
- name: Archive linux/arm64
uses: actions/upload-artifact@v3
with:
name: qtag-linux-arm64
path: ./dist/qtag