-
Notifications
You must be signed in to change notification settings - Fork 51
42 lines (36 loc) · 1.14 KB
/
Changelog.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
name: Changelog
on:
push:
branches:
- main
jobs:
changelog:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Generate Changelog
id: changelog
uses: conventional-changelog-action@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
output-file: CHANGELOG.md
preset: angular # You can choose a preset or configure your own
- name: Create Release
if: ${{ github.ref == 'refs/heads/main' && steps.changelog.outputs.changes != '' }}
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.sha }}
release_name: Release ${{ github.sha }}
body: |
### Changelog
$(cat CHANGELOG.md) # Include the generated changelog here
- name: Commit Changelog
if: ${{ steps.changelog.outputs.changes != '' }}
uses: EndBug/add-and-commit@v9
with:
author_name: "GitHub Actions"
author_email: "[email protected]"
message: "Update changelog"