generated from nvti/template
-
Notifications
You must be signed in to change notification settings - Fork 1
83 lines (83 loc) · 2.33 KB
/
build.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
name: Build
on: push
jobs:
build-linux:
runs-on: ubuntu-latest
name: Build for ubuntu
steps:
- uses: actions/checkout@v2
- name: Build
uses: actions/setup-go@v2
with:
go-version: '^1.16'
- run: go build -o react ./...
- run: go vet ./...
- name: zip linux artifact
if: startsWith(github.ref, 'refs/tags/')
run: zip linux.zip react
- name: upload linux artifact
uses: actions/upload-artifact@v2
if: startsWith(github.ref, 'refs/tags/')
with:
name: uploads
path: linux.zip
build-windows:
runs-on: windows-latest
name: Build for windows
steps:
- uses: actions/checkout@v2
- name: Build
uses: actions/setup-go@v2
with:
go-version: '^1.16'
- run: go build -o react ./...
- run: go vet ./...
- name: zip windows artifact
if: startsWith(github.ref, 'refs/tags/')
run: powershell Compress-Archive react windows.zip
- name: upload windows artifact
uses: actions/upload-artifact@v2
if: startsWith(github.ref, 'refs/tags/')
with:
name: uploads
path: windows.zip
build-macos:
runs-on: macos-latest
name: Build for macos
steps:
- uses: actions/checkout@v2
- name: Build
uses: actions/setup-go@v2
with:
go-version: '^1.16'
- run: go build -o react ./...
- run: go vet ./...
- name: zip macos artifact
if: startsWith(github.ref, 'refs/tags/')
run: zip macos.zip react
- name: upload macos artifact
uses: actions/upload-artifact@v2
if: startsWith(github.ref, 'refs/tags/')
with:
name: uploads
path: macos.zip
upload-release:
runs-on: ubuntu-latest
needs: [build-macos, build-linux, build-windows]
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v2
- name: download artifacts
uses: actions/download-artifact@v2
with:
name: uploads
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
macos.zip
linux.zip
windows.zip