File tree Expand file tree Collapse file tree 3 files changed +73
-12
lines changed Expand file tree Collapse file tree 3 files changed +73
-12
lines changed Original file line number Diff line number Diff line change 1
- name : Pipeline
1
+ name : Push workflow
2
2
3
3
on : push
4
4
5
5
jobs :
6
6
build :
7
7
runs-on : ubuntu-latest
8
-
9
8
steps :
10
- - uses : actions/checkout@v2
9
+ - uses : actions/checkout@v2
10
+ - name : Setup Go
11
+ uses : actions/setup-go@v2
12
+ with :
13
+ go-version : ' 1.16'
14
+ - name : Run build
15
+ run : |
16
+ go build .
11
17
12
- - name : Setup Go
13
- uses : actions/setup-go@v2
14
- with :
15
- go-version : ' 1.16'
18
+ lint :
19
+ runs-on : ubuntu-latest
20
+ steps :
21
+ - uses : actions/checkout@v2
22
+ - name : Setup Go
23
+ uses : actions/setup-go@v2
24
+ with :
25
+ go-version : ' 1.16'
26
+ - name : Run go vet
27
+ run : go vet .
16
28
17
- - name : Run build
18
- run : |
19
- go build .
29
+ commitlint :
30
+ name : Commit Lint
31
+ runs-on : ubuntu-latest
32
+ steps :
33
+ - name : Checkout
34
+ uses : actions/checkout@v2
35
+ with :
36
+ fetch-depth : 0
37
+ - name : Lint Commit
38
+ uses : wagoid/commitlint-github-action@v3
20
39
21
- - name : Run go vet
22
- run : go vet .
40
+ release :
41
+ name : Release
42
+ needs : [build, lint, commitlint]
43
+ if : github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
44
+ runs-on : ubuntu-latest
45
+ steps :
46
+ - name : Checkout
47
+ uses : actions/checkout@v2
48
+ - name : Setup Node.js
49
+ uses : actions/setup-node@v2
50
+ with :
51
+ node-version : 14
52
+ - name : Release
53
+ env :
54
+ GITHUB_TOKEN : ${{ secrets.TOKEN }}
55
+ run : npx semantic-release
Original file line number Diff line number Diff line change
1
+ name : Release workflow
2
+
3
+ on :
4
+ release :
5
+ types : [created]
6
+
7
+ jobs :
8
+ release-linux-amd64 :
9
+ name : release linux/amd64
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - uses : actions/checkout@v2
13
+ - name : Publish binaries to release
14
+ uses :
wangyoucao577/[email protected]
15
+ with :
16
+ github_token : ${{ secrets.GITHUB_TOKEN }}
17
+ goos : linux
18
+ goarch : amd64
Original file line number Diff line number Diff line change
1
+ {
2
+ "branches" : [
3
+ " main"
4
+ ],
5
+ "plugins" : [
6
+ " @semantic-release/commit-analyzer" ,
7
+ " @semantic-release/release-notes-generator" ,
8
+ " @semantic-release/github"
9
+ ]
10
+ }
You can’t perform that action at this time.
0 commit comments