Skip to content

Commit ca14f49

Browse files
committed
Update release.yml
1 parent be11f63 commit ca14f49

1 file changed

Lines changed: 17 additions & 10 deletions

File tree

.github/workflows/release.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,54 @@
11
name: Release
2-
32
on:
43
push:
54
tags:
65
- "v*"
7-
86
jobs:
97
build:
108
runs-on: ubuntu-latest
119
permissions:
1210
contents: write
13-
1411
steps:
1512
- name: Checkout
1613
uses: actions/checkout@v4
17-
1814
- name: Setup pnpm
1915
uses: pnpm/action-setup@v4
2016
with:
2117
version: latest
22-
2318
- name: Setup Node
2419
uses: actions/setup-node@v4
2520
with:
2621
node-version: 24
2722
cache: pnpm
28-
2923
- name: Install dependencies
3024
run: pnpm install
31-
3225
- name: Build frontend
3326
run: pnpm build
34-
3527
- name: Create plugin zip
3628
run: |
3729
mkdir -p decky-ftpd-dist/decky-ftpd
3830
cp main.py plugin.json package.json decky-ftpd-dist/decky-ftpd/
3931
cp -r dist decky-ftpd-dist/decky-ftpd/dist
4032
cp -r py_modules decky-ftpd-dist/decky-ftpd/py_modules
4133
cd decky-ftpd-dist && zip -r ../decky-ftpd.zip decky-ftpd/
42-
34+
- name: Extract release notes for this version
35+
run: |
36+
VERSION="${GITHUB_REF_NAME#v}"
37+
awk -v ver="$VERSION" '
38+
/^## \[/ {
39+
if (found) exit
40+
if ($0 ~ "^## \\[" ver "\\]") { found=1; next }
41+
}
42+
found { print }
43+
' CHANGELOG.md > RELEASE_NOTES.md
44+
echo "--- Extracted notes for v$VERSION ---"
45+
cat RELEASE_NOTES.md
46+
if [ ! -s RELEASE_NOTES.md ]; then
47+
echo "::error::No changelog section found for version $VERSION"
48+
exit 1
49+
fi
4350
- name: Create GitHub Release
4451
uses: softprops/action-gh-release@v2
4552
with:
4653
files: decky-ftpd.zip
47-
body_path: CHANGELOG.md
54+
body_path: RELEASE_NOTES.md

0 commit comments

Comments
 (0)