release notes optional on pre-release
@@ -30,12 +30,16 @@ jobs:
id: release_notes
run: |
TAG="${GITHUB_REF/refs\/tags\/v/}" # clean tag
+ if [[ "$TAG" != *"rc"* ]]; then
VER="${TAG/rc*/}" # remove pre-release identifier
RELEASE_NOTES="$(cat docs/release/release_${VER//./_}.md)"
# https://github.community/t5/GitHub-Actions/set-output-Truncates-Multiline-Strings/m-p/38372/highlight/true#M3322
RELEASE_NOTES="${RELEASE_NOTES//'%'/'%25'}"
RELEASE_NOTES="${RELEASE_NOTES//$'\n'/'%0A'}"
RELEASE_NOTES="${RELEASE_NOTES//$'\r'/'%0D'}"
+ else
+ RELEASE_NOTES="pre-release $TAG"
+ fi
# https://help.github.com/en/actions/reference/workflow-commands-for-github-actions
echo "::set-env name=tag::$TAG"
echo "::set-output name=contents::$RELEASE_NOTES"
