Skip to content

Commit

Permalink
Update post-release-updates GitHub Actions workflow to delete all tra…
Browse files Browse the repository at this point in the history
…iling newlines from Release-testing-instructions.md before adding new entries. (#8719)
  • Loading branch information
alopezari authored Apr 29, 2024
1 parent ba36a35 commit 0d89ec7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/post-release-updates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,10 @@ jobs:
echo ":warning: File "$NEXT_RELEASE_VERSION_INSTRUCTIONS_FILENAME.md" already exists. No action needed." >> $GITHUB_STEP_SUMMARY
fi
# If an entry for the next version doesn't exist yet
# Check if this release version exists in Release-testing-instructions.md
if ! grep -q "v$NEXT_RELEASE_VERSION" Release-testing-instructions.md; then
# If it doesn't exist, remove all trailing newlines and add the new version for this release
perl -pi -e 'BEGIN{undef $/;} s/\n+\z//' Release-testing-instructions.md
echo -ne "\n* [v$NEXT_RELEASE_VERSION](https://github.com/Automattic/woocommerce-payments/wiki/$NEXT_RELEASE_VERSION_INSTRUCTIONS_FILENAME)" >> Release-testing-instructions.md
echo "Added a new entry for v$NEXT_RELEASE_VERSION in \"Release-testing-instructions.md\"." >> $GITHUB_STEP_SUMMARY
HAS_CHANGES=true
Expand Down
5 changes: 5 additions & 0 deletions changelog/update-post-release-updates
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: dev
Comment: Just a minor change in a GitHub Actions workflow to make it more robust.


0 comments on commit 0d89ec7

Please sign in to comment.