-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (66 loc) · 2.02 KB
/
Copy pathrelease.yaml
File metadata and controls
77 lines (66 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Release
on:
workflow_dispatch:
inputs:
tag:
description: 'Release tag (leave empty for auto-bump from conventional commits)'
required: false
type: string
permissions:
contents: write
jobs:
release:
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: '1.25'
cache: true
- name: Install govulncheck
run: go install golang.org/x/vuln/cmd/govulncheck@latest
- name: Run tests
run: |
make build
go test ./... -v
make vuln
- 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 --release-notes ${{ steps.notes.outputs.release-notes }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}