-
Notifications
You must be signed in to change notification settings - Fork 16
59 lines (50 loc) · 1.44 KB
/
go.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
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Go
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Set up go version from go.mod
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
- name: Test & Vet
run: make test vet
- name: Build
run: |
GOOS=linux make build-stayrtr
GOOS=linux GOARCH=arm64 make build-stayrtr
GOOS=darwin make build-stayrtr
GOOS=windows EXTENSION=.exe make build-stayrtr
GOOS=linux make build-rtrdump
GOOS=linux GOARCH=arm64 make build-rtrdump
GOOS=darwin make build-rtrdump
GOOS=windows EXTENSION=.exe make build-rtrdump
GOOS=linux make build-rtrmon
GOOS=linux GOARCH=arm64 make build-rtrmon
GOOS=darwin make build-rtrmon
GOOS=windows EXTENSION=.exe make build-rtrmon
- name: Install fpm
run: |
sudo apt-get update
sudo apt-get install -y rpm ruby ruby-dev
sudo gem install fpm
- name: Package
run: |
make package-deb-stayrtr package-rpm-stayrtr
GOARCH=arm64 make package-deb-stayrtr package-rpm-stayrtr
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/*
retention-days: 14