Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(backport): fixup release notes (#1148) #1149

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/release-drafter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,25 +82,25 @@ jobs:
-q .body \
)

if [[ -z $notes ]]; then
if [[ -z "${notes}" ]]; then
echo "No release notes generated from API, failed"
exit 1
fi

echo "Auto-Collapsing release notes to reduce size"
printf "%s\n" "$notes" > $RUNNER_TEMP/release_notes.md
echo "${notes}" > $RUNNER_TEMP/release_notes.md
bash hack/collapse/auto_collapse.sh $RUNNER_TEMP/release_notes.md $RUNNER_TEMP/release_notes_processed.md ${{ env.COLLAPSE_THRESHOLD }}
notes=$(cat $RUNNER_TEMP/release_notes_processed.md)

echo "Release Notes generated for ${{env.RELEASE_VERSION}}:"
printf "%s\n" "$notes"
echo "${notes}"

echo "Verifying if release ${{env.RELEASE_VERSION}} already exists"
if [[ -z $(gh release list -R ${REPO} --json name -q '.[] | select(.name == "${{env.RELEASE_VERSION}}")') ]]; then
echo "Release ${{env.RELEASE_VERSION}} does not exist yet, creating from scratch"
gh release create ${{env.RELEASE_VERSION}} \
--title "${{env.RELEASE_VERSION}}" \
--notes "$(printf "%s\n" "$notes")" \
--notes "${notes}" \
--draft \
--latest=false \
--target ${{ github.ref }} \
Expand Down