Skip to content
Merged
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
48 changes: 43 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
name: Release

on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
tag:
description: 'Release tag (leave empty for auto-bump from conventional commits)'
required: false
type: string

permissions:
contents: write
Expand All @@ -21,15 +24,50 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: '1.24'
cache: true

- name: Run tests
run: make test-integration
run: |
make build
go test ./... -v

- name: Determine version
id: version
uses: AxeForging/releaseforge@main
with:
command: bump

- name: Set tag
id: tag
run: |
if [ -n "${{ inputs.tag }}" ]; then
echo "tag=${{ inputs.tag }}" >> "$GITHUB_OUTPUT"
else
echo "tag=${{ steps.version.outputs.next-version }}" >> "$GITHUB_OUTPUT"
fi

- name: Generate release notes
id: notes
uses: AxeForging/releaseforge@main
with:
command: generate
api-key: ${{ secrets.GEMINI_API_KEY }}
github-token: ${{ secrets.GITHUB_TOKEN }}
# If GEMINI_API_KEY is unset/invalid the LLM step fails and releaseforge
# falls back to git commit-log notes, so the release still succeeds.
use-git-fallback: "true"

- name: Create and push tag
run: |
echo "Releasing ${{ steps.tag.outputs.tag }}"
git tag ${{ steps.tag.outputs.tag }}
git push origin ${{ steps.tag.outputs.tag }}

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest
args: release --clean
args: release --clean --release-notes ${{ steps.notes.outputs.release-notes }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading