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

Fix prepare release script #2019

Merged
merged 8 commits into from
Feb 19, 2025
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/get_release_notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
IFS="" echo "$OUTPUT" >> $GITHUB_STEP_SUMMARY

# Converting the output to Base64 to get a single line required by the GITHUB_OUTPUT
BASE64_RELEASE_NOTES=$(echo "$OUTPUT" | base64)
BASE64_RELEASE_NOTES=$(echo "$OUTPUT" | base64 | tr -d '\n')
echo "Base64 Release Notes: $BASE64_RELEASE_NOTES"
IFS="" echo "RELEASE_NOTES=$BASE64_RELEASE_NOTES" >> $GITHUB_OUTPUT
fi
Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/prepare_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,18 @@ jobs:
- name: Prepare Release Notes
run: |
RELEASE_NOTES=$(echo "$BASE_64_RELEASE_NOTES" | base64 --decode)
rm -rf "${{ github.workspace }}/release_notes.md" # Making sure we start a fresh document
echo "$RELEASE_NOTES" >> "${{ github.workspace }}/release_notes.md"
TMP_DIR="${{ github.workspace }}/.tmp"
RELEASE_NOTES_FILE_PATH="$TMP_DIR/release_notes.md"

if [ -e $RELEASE_NOTES_FILE_PATH ]
then
echo "OLD RELEASE NOTES"
cat "$RELEASE_NOTES_FILE_PATH"
rm -rf $RELEASE_NOTES_FILE_PATH # Making sure we start a fresh document
fi

mkdir -p "$TMP_DIR"
echo "$RELEASE_NOTES" >> $RELEASE_NOTES_FILE_PATH
env:
BASE_64_RELEASE_NOTES: ${{ needs.get-release-notes.outputs.RELEASE_NOTES }}

Expand All @@ -59,5 +69,5 @@ jobs:
branch: "release/${{ github.event.inputs.sdk-version }}"
commit-message: "chore: prepare '${{ github.event.inputs.sdk-version }}' release"
title: "[Release] ${{ github.event.inputs.sdk-version }}"
body-path: "${{ github.workspace }}/release_notes.md"
body-path: "${{ github.workspace }}/.tmp/release_notes.md"
token: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,4 @@ Package.resolved
TempProject/
.build
.vscode
.tmp
Loading