From ce96ea2e962ee2d602c9c2d48746ef02fbd4d1cc Mon Sep 17 00:00:00 2001 From: marcusquinn <6428977+marcusquinn@users.noreply.github.com> Date: Mon, 21 Apr 2025 15:47:57 +0100 Subject: [PATCH] Improve release workflow - Add consistent naming convention for releases - Include changelog content in release notes - Improve release title format --- .github/workflows/release.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0962770..b0d84e0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -52,17 +52,27 @@ jobs: zip -r ../wp-plugin-starter-template-for-ai-coding-${{ env.VERSION }}.zip wp-plugin-starter-template-for-ai-coding -x "*.DS_Store" -x "*.git*" cd .. + - name: Extract changelog + id: extract_changelog + run: | + CHANGELOG=$(grep -A 20 "#### \[${{ env.VERSION }}\]" CHANGELOG.md | sed -n '/####/,/####/p' | sed '$d') + echo "CHANGELOG<> $GITHUB_ENV + echo "$CHANGELOG" >> $GITHUB_ENV + echo "EOF" >> $GITHUB_ENV + - name: Create Release id: create_release uses: softprops/action-gh-release@v1 with: files: wp-plugin-starter-template-for-ai-coding-${{ env.VERSION }}.zip - name: Version ${{ env.VERSION }} + name: v${{ env.VERSION }} - WordPress Plugin Starter Template draft: false prerelease: false body: | - Release of version ${{ env.VERSION }} + # WordPress Plugin Starter Template v${{ env.VERSION }} - See [CHANGELOG.md](https://github.com/wpallstars/wp-plugin-starter-template-for-ai-coding/blob/main/CHANGELOG.md) for details. + ${{ env.CHANGELOG }} + + [View full changelog](https://github.com/wpallstars/wp-plugin-starter-template-for-ai-coding/blob/main/CHANGELOG.md) env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}