File tree Expand file tree Collapse file tree 3 files changed +50
-1
lines changed
Expand file tree Collapse file tree 3 files changed +50
-1
lines changed Original file line number Diff line number Diff line change 4141 name : github-pages
4242 url : ${{ steps.deployment.outputs.page_url }}
4343 runs-on : ubuntu-latest
44+ if : github.event_name == 'release' && github.event.action == 'published'
4445 steps :
4546 - name : 🚀 Deploy to GitHub Pages
4647 id : deployment
Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ push :
5+ tags :
6+ - v[0-9]+.[0-9]+.[0-9]+
7+ - v[0-9]+.[0-9]+.[0-9]+rc[0-9]+
8+
9+ permissions :
10+ contents : write
11+
12+ jobs :
13+ deploy :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - name : Checkout Repository
17+ uses : actions/checkout@v5
18+
19+ - name : Extract release notes
20+ id : notes
21+ run : |
22+ TAG="${GITHUB_REF_NAME#v}"
23+ echo "Extracting changelog for tag: ${TAG}"
24+
25+ awk "/^## \\[${TAG}\\]/ {flag=1; next} /^## \\[/ {if(flag){exit}} flag" CHANGELOG.md > RELEASE_NOTES.txt || true
26+
27+ # If no specific section found, use the full changelog
28+ if [ ! -s RELEASE_NOTES.txt ]; then
29+ echo "No changelog section found for ${TAG}, using full changelog."
30+ cat CHANGELOG.md > RELEASE_NOTES.txt
31+ fi
32+
33+ {
34+ echo "notes<<EOF"
35+ cat RELEASE_NOTES.txt
36+ echo "EOF"
37+ } >> "$GITHUB_OUTPUT"
38+
39+ - name : Create GitHub release
40+ uses : softprops/action-gh-release@v2
41+ with :
42+ tag_name : ${{ github.ref_name }}
43+ name : ${{ github.ref_name }}
44+ body : ${{ steps.notes.outputs.notes }}
45+ draft : true
46+ prerelease : ${{ contains(github.ref_name, 'rc') }}
47+ env :
48+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
55The format is based on [ Keep a Changelog] ( https//keepachangelog.com/en/1.1.0/ ) ,
66and this project adheres to [ Semantic Versioning] ( https//semver.org/spec/v2.0.0.html ) .
77
8- ## [ 0.2.0] - 2025-11-03
8+ ## [ 0.2.0] - 2025-11-04
99
1010### Added
1111
You can’t perform that action at this time.
0 commit comments