-
Notifications
You must be signed in to change notification settings - Fork 196
43 lines (36 loc) · 1.02 KB
/
release.yml
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
name: release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set Tag
id: tag
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.21
- name: Install git-chglog
run: go install github.com/git-chglog/git-chglog/cmd/git-chglog@latest
- name: generate changelog
run: |
$(go env GOPATH)/bin/git-chglog \
-c .chglog/config.yml \
-o RELEASE_CHANGELOG.md \
${{ steps.tag.outputs.tag }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release --rm-dist --release-notes=RELEASE_CHANGELOG.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}