generated from Flokkq/git-cliff-template
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (38 loc) · 1.12 KB
/
release.yaml
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
name: Generate Changelog
on:
push:
tags:
- "v*.*.*"
permissions:
contents: write
packages: write
jobs:
generate-changelog:
name: Generate Changelog
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set Up Git
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
- name: Generate Changelog with git-cliff
uses: orhun/git-cliff-action@main
id: git-cliff
with:
config: cliff.toml
args: -vv --latest --no-exec --github-repo ${{ github.repository }}
- name: Display Generated Changelog
run: echo "${{ steps.git-cliff.outputs.content }}"
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref }}
release_name: "Release ${{ github.ref }}"
body: ${{ steps.git-cliff.outputs.content }}
draft: false
prerelease: true
token: ${{ secrets.GH_PAT }}