Skip to content

Commit 383933a

Browse files
add release-publish.yml
1 parent ef25678 commit 383933a

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/release-publish.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Release & Publish
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
8+
jobs:
9+
release:
10+
name: Generate Changelog and Publish Release
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout Code
15+
uses: actions/checkout@v3
16+
17+
- name: Set up Git
18+
run: |
19+
git config --global user.name 'github-actions[bot]'
20+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
21+
22+
- name: Generate Release Notes
23+
uses: RedCrafter07/release-notes-actions@main
24+
with:
25+
token: ${{ secrets.GITHUB_TOKEN }}
26+
outputFile: CHANGELOG.md
27+
28+
- name: Update Changelog file
29+
uses: stefanzweifel/changelog-updater-action@v1
30+
with:
31+
release-date: ${{ github.event.head_commit.timestamp }}
32+
latest-version: ${{ github.ref_name }}
33+
changelog-path: ./CHANGELOG.md
34+
35+
- name: Commit updated changelog
36+
run: |
37+
git add CHANGELOG.md
38+
git commit -m "chore: update changelog for ${{ github.ref_name }}"
39+
git push
40+
41+
- name: Create GitHub Release
42+
uses: softprops/action-gh-release@v2
43+
with:
44+
name: Release ${{ github.ref_name }}
45+
body_path: ./CHANGELOG.md
46+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)