Skip to content

Commit baa5971

Browse files
committed
add goreleaser github action
1 parent 4ce44d4 commit baa5971

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/go.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build with goreleaser
2+
3+
on:
4+
push:
5+
branches: [ master, devel ]
6+
tags:
7+
- "*"
8+
pull_request:
9+
branches: [ master, devel ]
10+
11+
jobs:
12+
13+
build:
14+
runs-on: ubuntu-20.04
15+
steps:
16+
- uses: actions/checkout@v3
17+
- uses: actions/setup-go@v4
18+
19+
- name: Build release
20+
uses: goreleaser/goreleaser-action@v4
21+
if: startsWith(github.ref, 'refs/tags/')
22+
with:
23+
version: latest
24+
args: release --clean
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
28+
- name: Build snapshot
29+
uses: goreleaser/goreleaser-action@v4
30+
if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
31+
with:
32+
version: latest
33+
args: release --clean --snapshot
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
37+
- uses: actions/upload-artifact@v3
38+
with:
39+
name: PR-DNSd
40+
path: dist/*

0 commit comments

Comments
 (0)