Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Release

on:
push:
tags:
- "*"

jobs:
goreleaser:
name: GoReleaser
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fetch all tags
run: git fetch --force --tags
- name: Setup Golang
uses: actions/setup-go@v5
with:
go-version: 1.24.x
cache: false
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
version: '~> v2'
args: release --clean --timeout 5m
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
71 changes: 71 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
version: 2

project_name: jm

builds:
- id: jm
main: main.go
binary: jm
env:
- CGO_ENABLED=0
flags:
- -v
ldflags:
- -X github.com/janpieper/jm/common.version={{ .Version }}
- -X github.com/janpieper/jm/common.buildDate={{ .Date }}
- -X github.com/janpieper/jm/common.gitCommit={{ .FullCommit }}
- -X github.com/janpieper/jm/common.gitTreeState={{ .GitTreeState }}
- -X github.com/janpieper/jm/common.gitTag={{ .Tag }}
- -extldflags="-static"
goos:
- linux
- windows
goarch:
- amd64
- arm64
ignore:
- goos: windows
goarch: s390x
- goos: windows
goarch: ppc64le
- goos: windows
goarch: arm64

archives:
- formats: [tar.gz]
name_template: |-
{{ .ProjectName }}-{{ .Os }}-{{ .Arch }}

checksum:
name_template: checksums.txt
algorithm: sha256

changelog:
use: github
sort: asc
abbrev: 0
groups:
- title: 'Breaking Changes'
regexp: '^.*?(\([[:word:]]+\))??!:.+$'
order: 0
- title: 'Features'
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
order: 100
- title: 'Bug fixes'
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
order: 200
- title: 'Documentation'
regexp: '^.*?docs(\([[:word:]]+\))??!?:.+$'
order: 300
- title: 'Other work'
order: 999
filters:
exclude:
- '^test:'
- '(?i)bump'

release:
prerelease: auto
draft: false
footer: |
**Full Changelog**: https://github.com/janpieper/jm/compare/{{ .PreviousTag }}...{{ .Tag }}