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: escape quotes in release action #2236

Merged
merged 1 commit into from
Jul 5, 2023
Merged

Chore: escape quotes in release action #2236

merged 1 commit into from
Jul 5, 2023

Conversation

katspaugh
Copy link
Member

@katspaugh katspaugh commented Jul 5, 2023

What it solves

The release action pastes the contents of the RC pull request into a bash variable using an echo command, but if the PR description contains a quote it breaks the bash syntax.

E.g.

Remove "What's new"

@github-actions
Copy link

github-actions bot commented Jul 5, 2023

Branch preview

✅ Deploy successful!

https://fix_release--walletweb.review-wallet-web.5afe.dev

@github-actions
Copy link

github-actions bot commented Jul 5, 2023

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@@ -3,7 +3,7 @@ name: Tag & GitHub release
on:
pull_request_target:
branches:
- main
- dev
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the change from main to dev?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To test the PR, I'll revert it later.

@katspaugh katspaugh force-pushed the fix-release branch 9 times, most recently from 5cddcb6 to 96e696b Compare July 5, 2023 15:55
Use printf

Use a heredoc

Use jq
@katspaugh
Copy link
Member Author

After trying a few different things, the best solution was to pass the body as a variable instead of a file. For that, I've replaced our release action which also fixed the obsolete set_output warnings.

@katspaugh katspaugh merged commit a409dfc into dev Jul 5, 2023
@katspaugh katspaugh deleted the fix-release branch July 5, 2023 16:09
@github-actions github-actions bot locked and limited conversation to collaborators Jul 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants