File tree 7 files changed +101
-18
lines changed
7 files changed +101
-18
lines changed Original file line number Diff line number Diff line change
1
+ name : goreleaser
2
+ on :
3
+ push :
4
+ branches : [main]
5
+ tags :
6
+ - ' v*'
7
+ jobs :
8
+ goreleaser :
9
+ runs-on : ubuntu-latest
10
+ if : success() && startsWith(github.ref, 'refs/tags/')
11
+ steps :
12
+ - uses : actions/checkout@v3
13
+ with :
14
+ fetch-depth : 0
15
+ - uses : actions/setup-go@v3
16
+ with :
17
+ go-version : ' >=1.19.3'
18
+ cache : true
19
+ - run : make dependencies
20
+ - run : make build-frontend
21
+ - uses : goreleaser/goreleaser-action@v2
22
+ with :
23
+ distribution : goreleaser
24
+ version : latest
25
+ args : release --rm-dist
26
+ env :
27
+ GITHUB_TOKEN : ${{ secrets.GH_TOKEN }}
28
+
Original file line number Diff line number Diff line change 1
1
on :
2
2
push :
3
- branches : [ main, develop ]
3
+ branches : [ main, develop]
4
4
pull_request :
5
- branches : [ main ]
5
+ branches : [ main]
6
6
name : Test-MacOs
7
7
jobs :
8
8
test :
@@ -11,11 +11,16 @@ jobs:
11
11
- name : Install Go
12
12
uses : actions/setup-go@v2
13
13
with :
14
- go-version : 1.16
14
+ go-version : ' >= 1.16'
15
15
- name : Checkout code
16
16
uses : actions/checkout@v2
17
17
- name : Setup config script
18
18
# using locals for mac-OS because github CI mac platforms don't have docker
19
- run : make prep-ci-local
19
+ run : |
20
+ make prep-ci-local
21
+ make dependencies
22
+ make build-frontend
20
23
- name : Test
21
- run : go test -v ./...
24
+ run : |
25
+ go mod tidy
26
+ go test -v ./...
Original file line number Diff line number Diff line change 1
1
on :
2
2
push :
3
- branches : [ main, develop ]
3
+ branches : [ main, develop]
4
4
pull_request :
5
- branches : [ main ]
5
+ branches : [ main]
6
6
name : Test-Linux
7
7
jobs :
8
8
test :
@@ -11,11 +11,16 @@ jobs:
11
11
- name : Install Go
12
12
uses : actions/setup-go@v2
13
13
with :
14
- go-version : 1.16
14
+ go-version : ' >= 1.16'
15
15
- name : Checkout code
16
16
uses : actions/checkout@v2
17
17
- name : Setup SSH server and config
18
18
# run docker ssh container for ssh tests
19
- run : make prep-ci-ssh
19
+ run : |
20
+ make prep-ci-ssh
21
+ make dependencies
22
+ make build-frontend
20
23
- name : Test
21
- run : go test -v ./...
24
+ run : |
25
+ go mod tidy
26
+ go test -v ./...
Original file line number Diff line number Diff line change 1
1
on :
2
2
push :
3
- branches : [ main, develop ]
3
+ branches : [ main, develop]
4
4
pull_request :
5
- branches : [ main ]
5
+ branches : [ main]
6
6
name : Test-Windows
7
7
jobs :
8
8
test :
11
11
- name : Install Go
12
12
uses : actions/setup-go@v2
13
13
with :
14
- go-version : 1.16
14
+ go-version : ' >= 1.16'
15
15
- name : Checkout code
16
16
uses : actions/checkout@v2
17
17
- name : Choco Install make
20
20
args : install make
21
21
- name : Setup config script
22
22
# using locals for Windows because github CI Windows platforms don't have docker
23
- run : make prep-ci-local-windows
23
+ run : |
24
+ make prep-ci-local-windows
25
+ make dependencies
26
+ make build-frontend
24
27
- name : Test
25
- run : go test -v ./...
28
+ run : |
29
+ go mod tidy
30
+ go test -v ./...
Original file line number Diff line number Diff line change
1
+ before :
2
+ hooks :
3
+ - go mod tidy
4
+ - go generate ./...
5
+ builds :
6
+ - env :
7
+ - CGO_ENABLED=0
8
+ goos :
9
+ - linux
10
+ - windows
11
+ - darwin
12
+ archives :
13
+ - replacements :
14
+ darwin : Darwin
15
+ linux : Linux
16
+ windows : Windows
17
+ 386 : i386
18
+ amd64 : x86_64
19
+ checksum :
20
+ name_template : ' checksums.txt'
21
+ # snapshot:
22
+ # name_template: "{{ incpatch .Version }}-next"
23
+ changelog :
24
+ sort : asc
25
+ filters :
26
+ exclude :
27
+ - ' ^docs:'
28
+ - ' ^test:'
29
+ - ' ^intergration:'
30
+ - ' ^assets:'
31
+ nfpms :
32
+ - maintainer : Bisohns Corp.
33
+ description : YAML based tool for monitoring metrics across multiple hosts
34
+ homepage : https://github.com/bisohns/saido
35
+ license : Apache License 2.0
36
+ formats :
37
+ - deb
38
+ - rpm
39
+ - apk
Original file line number Diff line number Diff line change 40
40
dependencies :
41
41
ifeq ($(bin ) ,main.exe)
42
42
@make prep-ci-local-windows
43
+ yarn add react-scripts@latest
43
44
else
44
45
@make prep-ci-local
45
46
endif
48
49
49
50
.PHONY : build-frontend
50
51
build-frontend :
51
- cd web && yarn build && cd ..
52
+ cd web && export BUILD_PATH=../cmd/build && CI=false yarn build && cd ..
52
53
53
54
.PHONY : serve-backend
54
55
serve-backend :
Original file line number Diff line number Diff line change 28
28
},
29
29
"scripts" : {
30
30
"start" : " react-scripts start" ,
31
- "build" : " BUILD_PATH='../cmd/build' react-scripts build" ,
31
+ "build" : " react-scripts build" ,
32
32
"test" : " react-scripts test" ,
33
33
"eject" : " react-scripts eject"
34
34
},
50
50
" last 1 safari version"
51
51
]
52
52
}
53
- }
53
+ }
You can’t perform that action at this time.
0 commit comments