Skip to content

Commit

Permalink
Add a .goreleaser configuration and workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Demeester <[email protected]>
  • Loading branch information
vdemeester committed Jan 25, 2024
1 parent b2fba95 commit 5ef8121
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: release

on:
push:
tags:
- '*'

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- run: git fetch --prune --unshallow
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5
with:
go-version: 1.20.x
cache: true
- uses: goreleaser/[email protected]
with:
version: latest
args: release --timeout=60m --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42 changes: 42 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
before:
hooks:
- sed -i 's/devel/{{ .Tag }}/' ./pkg/version.json
builds:
- main: .
binary: catalog-cd
env:
- CGO_ENABLED=0
flags:
- -trimpath
goos:
- windows
- linux
- darwin
goarch:
- amd64
- arm64
- s390x
- "386"
- mips64le
- ppc64le
archives:
- name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}"
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
use: github
filters:
exclude:
- '^docs:'
- '^test:'


0 comments on commit 5ef8121

Please sign in to comment.