Skip to content

Commit

Permalink
Fix prepare release script (#2019)
Browse files Browse the repository at this point in the history
# Summary
- No additional file gets created on release preparation

# Ticket

<ticket>
COIOS-000
</ticket>

---------

Co-authored-by: Alex Guretzki <[email protected]>
  • Loading branch information
goergisn and Alex Guretzki authored Feb 19, 2025
1 parent 248c34d commit 48154b5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
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

0 comments on commit 48154b5

Please sign in to comment.