GitHub Actions - patch changelog only if change notes are provided

pull/204/head
Jakub Chrzanowski 3 years ago committed by Jakub Chrzanowski
parent ec6688c2b3
commit 7225827b67

@ -28,11 +28,24 @@ jobs:
java-version: 11
cache: gradle
# 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 "::set-output name=changelog::$CHANGELOG"
# Update Unreleased section with the current release note
- name: Patch Changelog
if: ${{ steps.properties.outputs.changelog != '' }}
run: |
./gradlew patchChangelog --release-note "$(cat << 'EOM'
${{ github.event.release.body }}
${{ steps.properties.outputs.changelog }}
EOM
)"
@ -50,6 +63,7 @@ jobs:
# Create pull request
- name: Create Pull Request
if: ${{ steps.properties.outputs.changelog != '' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |

@ -12,6 +12,7 @@
- Dependencies (GitHub Actions) - upgrade `jtalk/url-health-check-action` to `2`
- GitHub Actions general performance refactoring
- GitHub Actions - prepare plugin archive content to be archived once
- GitHub Actions - patch changelog only if change notes are provided
- Update `pluginUntilBuild` to include `213.*` (2021.3.*)
### Fixed

Loading…
Cancel
Save