Skip to content

Commit

Permalink
build: add release pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
idebeijer committed Jan 15, 2025
1 parent a29e503 commit 6a2b866
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: goreleaser

on:
push:
tags:
- "v*"

permissions:
contents: write

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

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@ go.work
.vscode
*.swp
*.swo
*~
*~

dist
40 changes: 40 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj

version: 2

before:
hooks:
- go mod tidy

builds:
- skip: true

release:
draft: true
prerelease: auto

changelog:
use: github
groups:
- title: "Breaking changes"
regexp: '^.*?\w+(\(.+\))?!:\s?.+$'
order: 0
- title: "Features"
regexp: '^.*?feat(\(.+\))??!?:.+$'
order: 1
- title: "Bug fixes"
regexp: '^.*?fix(\(.+\))??!?:.+$'
order: 2
- title: "Documentation"
regexp: '^.*?docs(\(.+\))??!?:.+$'
order: 3
- title: "Build system"
regexp: '^.*?(build|ci)(\(.+\))??!?:.+$'
order: 4
- title: "Others"
order: 999
filters:
exclude:
- '^.*?(test|style)(\(.+\))??!?:.+$'
- 'initial commit'

0 comments on commit 6a2b866

Please sign in to comment.