Skip to content

Commit

Permalink
use goreleaser to manage releases (#16)
Browse files Browse the repository at this point in the history
Make it so that static binaries get attached to the release
  • Loading branch information
zimbatm authored Jul 16, 2021
1 parent 21bb16b commit 2a5c418
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 9 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: goreleaser

on:
pull_request:
push:
tags:
- 'v*'

permissions:
contents: write

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
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: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser
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
@@ -1 +1,2 @@
nar-serve
dist/
28 changes: 28 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Documentation at http://goreleaser.com
before:
hooks:
- go mod tidy
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
nixpkgs.mkShell {
buildInputs = [
nixpkgs.go
nixpkgs.gopls
nixpkgs.gopkgs
nixpkgs.gocode
nixpkgs.go-outline
nixpkgs.gocode
nixpkgs.gopkgs
nixpkgs.gopls
nixpkgs.goreleaser
nixpkgs.minio
nixpkgs.minio-client
nixpkgs.reflex
Expand Down

0 comments on commit 2a5c418

Please sign in to comment.