mirror of
https://github.com/pypa/gh-action-pypi-publish.git
synced 2024-11-09 02:13:33 -05:00
Merge pull request #156 from trail-of-forks/tob-fix-annotation
This commit is contained in:
commit
f9ed8ba9ad
1 changed files with 4 additions and 0 deletions
|
@ -74,6 +74,10 @@ def die(msg: str) -> NoReturn:
|
||||||
with _GITHUB_STEP_SUMMARY.open("a", encoding="utf-8") as io:
|
with _GITHUB_STEP_SUMMARY.open("a", encoding="utf-8") as io:
|
||||||
print(_ERROR_SUMMARY_MESSAGE.format(message=msg), file=io)
|
print(_ERROR_SUMMARY_MESSAGE.format(message=msg), file=io)
|
||||||
|
|
||||||
|
# HACK: GitHub Actions' annotations don't work across multiple lines naively;
|
||||||
|
# translating `\n` into `%0A` (i.e., HTML percent-encoding) is known to work.
|
||||||
|
# See: https://github.com/actions/toolkit/issues/193
|
||||||
|
msg = msg.replace("\n", "%0A")
|
||||||
print(f"::error::Trusted publishing exchange failure: {msg}", file=sys.stderr)
|
print(f"::error::Trusted publishing exchange failure: {msg}", file=sys.stderr)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue