File tree Expand file tree Collapse file tree 2 files changed +40
-11
lines changed Expand file tree Collapse file tree 2 files changed +40
-11
lines changed Original file line number Diff line number Diff line change
1
+ name : goreleaser
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ pull_request :
6
+ push :
7
+ tags : ["v*"]
8
+
9
+ permissions :
10
+ contents : write
11
+
12
+ jobs :
13
+ release :
14
+ runs-on : ubuntu-latest
15
+ env :
16
+ flags : " "
17
+ steps :
18
+ - if : ${{ !startsWith(github.ref, 'refs/tags/v') }}
19
+ run : echo "flags=--snapshot" >> $GITHUB_ENV
20
+ - uses : actions/checkout@v3
21
+ with :
22
+ fetch-depth : 0
23
+ - uses : actions/setup-go@v4
24
+ with :
25
+ go-version : stable
26
+ - uses : goreleaser/goreleaser-action@v4
27
+ with :
28
+ distribution : goreleaser
29
+ version : latest
30
+ args : release --clean ${{ env.flags }}
31
+ env :
32
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
33
+ - uses : actions/upload-artifact@v3
34
+ with :
35
+ name : pping
36
+ path : dist/*
Original file line number Diff line number Diff line change
1
+ env :
2
+ - GO111MODULE=on
1
3
before :
2
4
hooks :
3
- - go mod download
5
+ - go mod tidy
4
6
builds :
5
7
- env :
6
8
- CGO_ENABLED=0
7
9
dir : cmd/pping
8
- goos :
9
- - linux
10
- - darwin
11
- - windows
12
- goarch :
13
- - " 386"
14
- - amd64
15
- ignore :
16
- - goos : darwin
17
- goarch : " 386"
10
+ - targets : [go_first_class]
18
11
archives :
19
12
- name_template : >-
20
13
{{ .ProjectName }}_
You can’t perform that action at this time.
0 commit comments