ops: add goreleaser configuration and release workflow

This commit is contained in:
Mathis Maquenne
2026-07-30 11:30:08 +02:00
parent 544fd09199
commit 3acd1aeb4f
3 changed files with 116 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
name: release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
# Fails the release if CHANGELOG.md has no section for this tag.
- name: Build release notes from CHANGELOG.md
run: .github/scripts/release-notes.sh "${{ github.ref_name }}" > "${RUNNER_TEMP}/release-notes.md"
- uses: goreleaser/goreleaser-action@v6
with:
version: '~> v2'
args: release --clean --release-notes=${{ runner.temp }}/release-notes.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}