Skip to content

Commit

Permalink
chore: add goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
kalbhor committed Jan 16, 2024
1 parent eac33a4 commit eb43fc8
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 7 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: goreleaser

on:
push:
tags:
- "v*" # Will trigger only if tag is pushed matching pattern `v*` (Eg: `v0.1.0`)

permissions:
contents: write

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.21"

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17 changes: 10 additions & 7 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
env:
- CGO_ENABLED=1

before:
hooks:
- make dist

- go mod tidy
builds:
- binary: kaf-relay.bin
main: .
- env:
- CGO_ENABLED=1
binary: kaf-relay
goos:
- windows
- darwin
- linux
- freebsd
- openbsd
- netbsd
goarch:
- amd64

archives:
- format: tar.gz
rlcp: true
files:
- config.toml.sample
- README.md
- LICENSE

0 comments on commit eb43fc8

Please sign in to comment.