GitHub Actions: simplify changelog handling

This commit is contained in:
Jakub Chrzanowski
2025-08-05 11:56:45 +02:00
parent 3eb0c4832a
commit e827319b92
3 changed files with 15 additions and 40 deletions

View File

@@ -44,27 +44,17 @@ jobs:
with:
cache-read-only: true
# Set environment variables
- name: Export Properties
id: properties
shell: bash
run: |
CHANGELOG="$(cat << 'EOM' | sed -e 's/^[[:space:]]*$//g' -e '/./,$!d'
${{ github.event.release.body }}
EOM
)"
echo "changelog<<EOF" >> $GITHUB_OUTPUT
echo "$CHANGELOG" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
# Update the Unreleased section with the current release note
- name: Patch Changelog
if: ${{ steps.properties.outputs.changelog != '' }}
if: ${{ github.event.release.body != '' }}
env:
CHANGELOG: ${{ steps.properties.outputs.changelog }}
CHANGELOG: ${{ github.event.release.body }}
run: |
./gradlew patchChangelog --release-note="$CHANGELOG"
RELEASE_NOTE="./build/tmp/release_note.txt"
echo "$CHANGELOG" > $RELEASE_NOTE
${{ github.event.release.body }}
./gradlew patchChangelog --release-note-file=$RELEASE_NOTE
# Publish the plugin to JetBrains Marketplace
- name: Publish Plugin