1
- name : Upload build asset
1
+ name : Tag
2
2
3
3
on :
4
4
release :
5
5
types : [published]
6
6
7
7
jobs :
8
8
build :
9
- name : Upload build asset for ${{ matrix.name }}
9
+ name : Build & upload ${{ matrix.name }}
10
10
runs-on : ${{ matrix.os }}
11
+ env :
12
+ CGO_ENABLED : ' 0'
11
13
strategy :
12
14
matrix :
13
15
include :
19
21
strip : true
20
22
runLint : true
21
23
runTests : true
24
+
22
25
- name : linux 386
23
26
os : ubuntu-latest
24
27
buildCmd : env GOOS=linux GOARCH=386 go build -o builds/zcli-linux-i386 -ldflags "-s -w -X github.com/zeropsio/zcli/src/cmd.version=${{ github.event.release.tag_name }}" ./cmd/zcli/main.go
27
30
strip : true
28
31
runLint : true
29
32
runTests : true
33
+
30
34
- name : darwin amd64
31
35
os : macos-latest
32
36
buildCmd : env GOOS=darwin GOARCH=amd64 go build -o builds/zcli-darwin-amd64 -ldflags "-s -w -X github.com/zeropsio/zcli/src/cmd.version=${{ github.event.release.tag_name }}" ./cmd/zcli/main.go
35
39
strip : false
36
40
runLint : true
37
41
runTests : true
42
+
38
43
- name : darwin arm64
39
44
os : macos-latest
40
45
buildCmd : env GOOS=darwin GOARCH=arm64 go build -o builds/zcli-darwin-arm64 -ldflags "-s -w -X github.com/zeropsio/zcli/src/cmd.version=${{ github.event.release.tag_name }}" ./cmd/zcli/main.go
43
48
strip : false
44
49
runLint : false
45
50
runTests : false
51
+
46
52
- name : windows amd64
47
53
os : ubuntu-latest
48
54
buildCmd : env GOOS=windows GOARCH=amd64 go build -o builds/zcli-win-x64.exe -ldflags "-s -w -X github.com/zeropsio/zcli/src/cmd.version=${{ github.event.release.tag_name }}" ./cmd/zcli/main.go
53
59
runTests : false
54
60
55
61
steps :
56
-
57
62
- name : Checkout code
58
63
uses : actions/checkout@v4
59
64
62
67
with :
63
68
go-version-file : " go.mod"
64
69
id : go
65
- env :
66
- CGO_ENABLED : 0
67
70
68
71
- name : Get dependencies
69
72
run : |
@@ -103,17 +106,6 @@ jobs:
103
106
asset_name : ${{ matrix.file }}
104
107
asset_content_type : application/octet-stream
105
108
106
- - name : Notify discord about new release
107
-
108
- with :
109
- webhook : ${{ secrets.DISCORD_WEBHOOK }}
110
- title : " New version of `zcli` is ready!"
111
- description : |
112
- Version `${{ github.event.release.tag_name }}`
113
- Changelog [here](${{ github.event.release.html_url }})
114
- color : 0xff91a4
115
- username : GitHub
116
-
117
109
publish-npm :
118
110
needs : build
119
111
runs-on : ubuntu-latest
@@ -131,3 +123,19 @@ jobs:
131
123
npm publish --access=public
132
124
env:
133
125
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
126
+
127
+ report :
128
+ needs : build
129
+ runs-on : ubuntu-latest
130
+ steps :
131
+ - name : Notify discord about new release
132
+
133
+ with :
134
+ webhook : ${{ secrets.DISCORD_WEBHOOK }}
135
+ title : " New version of `zcli` is ready!"
136
+ nocontext : ' true'
137
+ description : |
138
+ Version `${{ github.event.release.tag_name }}`
139
+ Changelog [here](${{ github.event.release.html_url }})
140
+ color : 0xff91a4
141
+ username : GitHub
0 commit comments