-
-
Notifications
You must be signed in to change notification settings - Fork 11
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*"
permissions:
contents: write
jobs:
releaser:
name: 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: 'stable'
cache: false
- name: Get Tag Name
id: tag
run: echo "tagName=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: Generate Changelog
id: gen_changelog
run: |
config=./_dev/config/chglog.config.yml
tagName=v${{ steps.tag.outputs.tagName }}
go run github.com/git-chglog/git-chglog/cmd/git-chglog@latest --config $config $tagName
go run github.com/git-chglog/git-chglog/cmd/git-chglog@latest --config $config $tagName > changelog.md
- name: Create Release
uses: ncipollo/release-action@v1
with:
bodyFile: changelog.md
token: ${{ secrets.GITHUB_TOKEN }}