Skip to content

Commit

Permalink
add goreleaser github action
Browse files Browse the repository at this point in the history
  • Loading branch information
korc committed May 15, 2023
1 parent 4ce44d4 commit baa5971
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/go.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build with goreleaser

on:
push:
branches: [ master, devel ]
tags:
- "*"
pull_request:
branches: [ master, devel ]

jobs:

build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4

- name: Build release
uses: goreleaser/goreleaser-action@v4
if: startsWith(github.ref, 'refs/tags/')
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Build snapshot
uses: goreleaser/goreleaser-action@v4
if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
with:
version: latest
args: release --clean --snapshot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/upload-artifact@v3
with:
name: PR-DNSd
path: dist/*

0 comments on commit baa5971

Please sign in to comment.