Skip to content

Commit a6d02b3

Browse files
Merge pull request #19 from cherab/develop
2 parents bc1f509 + 0f62e42 commit a6d02b3

File tree

3 files changed

+50
-1
lines changed

3 files changed

+50
-1
lines changed

.github/workflows/docs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ jobs:
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

.github/workflows/release.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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 }}

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https//keepachangelog.com/en/1.1.0/),
66
and 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

0 commit comments

Comments
 (0)