Address issues with release notes in workflow (#284)

* In release workflow, infer release notes from CHANGELOG

* Retain links in GitHub release notes
This commit is contained in:
Davide De Rosa 2023-04-07 12:08:55 +02:00 committed by GitHub
parent 8693a0084b
commit fc68c674a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 14 additions and 6 deletions

View File

@ -5,3 +5,4 @@ DELIVER_PLATFORM="ios"
DELIVER_METADATA_PATH="Passepartout/App/fastlane/ios/metadata"
DELIVER_SCREENSHOTS_PATH="Passepartout/App/fastlane/ios/screenshots"
PILOT_PLATFORM="ios"
CHANGELOG="CHANGELOG.md"

View File

@ -7,3 +7,4 @@ DELIVER_PLATFORM="osx"
DELIVER_METADATA_PATH="Passepartout/App/fastlane/mac/metadata"
DELIVER_SCREENSHOTS_PATH="Passepartout/App/fastlane/mac/screenshots"
PILOT_PLATFORM="osx"
CHANGELOG="CHANGELOG.md"

View File

@ -5,6 +5,7 @@ on:
types: [ opened, synchronize ]
paths-ignore:
- '.beta-*'
- '.env.*'
- '**/*.md'
- '**/*.sh'
- '**/*.yml'

View File

@ -1,7 +1,6 @@
#!/bin/bash
. .env.$1
CHANGELOG="CHANGELOG.md"
RELEASES=(`grep -n "^## " $CHANGELOG | sed -E "s/^([0-9]+).*$/\1/g"`)
UNRELEASED=${RELEASES[0]}
LATEST=${RELEASES[1]}
@ -11,4 +10,11 @@ if [ ! $LATEST ]; then
cat $CHANGELOG | tail -n $((LATEST - UNRELEASED - 1))
exit
fi
cat $CHANGELOG | head -n $((LATEST - 1)) | tail -n $((LATEST - UNRELEASED - 2))
if [ "$2" = "stripped" ]; then
SED_STRIPPED="sed -E 's/^(.*)\. \[.*$/\1./'"
else
SED_STRIPPED="cat"
fi
cat $CHANGELOG | head -n $((LATEST - 1)) | tail -n $((LATEST - UNRELEASED - 2)) | eval $SED_STRIPPED

View File

@ -2,6 +2,5 @@
. .env.$1
RELEASE_NOTES="$DELIVER_METADATA_PATH/en-US/release_notes.txt"
STRIPPED_ISSUES_SUB="s/^(.*)\. \[.*$/\1./"
ci/latest-changelog.sh $1 | sed -E "$STRIPPED_ISSUES_SUB" >"$RELEASE_NOTES"
ci/latest-changelog.sh $1 stripped >"$RELEASE_NOTES"

View File

@ -8,6 +8,6 @@ fi
APP_ROOT="Passepartout/App"
echo "# App Store"
echo
grep $VERSION CHANGELOG.md | cut -f 2- -d " "
grep -E "$VERSION \(" CHANGELOG.md | cut -f 2- -d " "
echo
cat $APP_ROOT/fastlane/ios/metadata/en-US/release_notes.txt
ci/latest-changelog.sh ios