Skip to content

Commit

Permalink
added goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
skoef committed Apr 21, 2022
1 parent 541bc99 commit f5d9a74
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 12 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,21 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
- name: Build
run: go build -v ./...
go-version: 1.18
- name: Test
run: go test -v ./...
- name: GoReleaser
uses: goreleaser/goreleaser-action@v2
if: startsWith(github.ref, 'refs/tags/')
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build/
39 changes: 39 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
before:
hooks:
- go mod tidy
dist: build
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
archives:
- format: binary
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ incpatch .Version }}-next"
nfpms:
- package_name: birdwatcher
homepage: https://github.com/skoef/birdwatcher
maintainer: "Reinier Schoof <reinier@skoef.nl>"
description: healthchecker for BIRD-anycasted services
license: MIT
contents:
- src: dist/systemd/birdwatcher.service
dst: /lib/system/systemd/birdwatcher.service
file_info:
owner: root
group: root
mode: 0644
dependencies:
- libc6
formats:
- deb
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
- '^Merge pull request'
8 changes: 0 additions & 8 deletions Makefile

This file was deleted.

0 comments on commit f5d9a74

Please sign in to comment.