Skip to content

Commit be9a69c

Browse files
author
Kimaki
committed
Make release mirror workflow non-blocking
1 parent 2f55945 commit be9a69c

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/exec.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,25 @@ jobs:
4545
tag="$(cat tag.txt)"
4646
title="$(cat title.txt)"
4747
48+
create_release() {
49+
if ! gh release create "$@"; then
50+
echo "Release ${tag} could not be published; treating this mirror run as non-blocking."
51+
fi
52+
}
53+
4854
if gh release view "${tag}" >/dev/null 2>&1; then
4955
echo "Release ${tag} already exists; skipping publish."
5056
else
5157
shopt -s nullglob
5258
assets=(upstream-release/*)
5359
5460
if [ "${#assets[@]}" -eq 0 ]; then
55-
gh release create "${tag}" \
61+
create_release "${tag}" \
5662
--title "${title}" \
5763
--notes-file release-notes.md \
5864
--latest
5965
else
60-
gh release create "${tag}" "${assets[@]}" \
66+
create_release "${tag}" "${assets[@]}" \
6167
--title "${title}" \
6268
--notes-file release-notes.md \
6369
--latest

0 commit comments

Comments
 (0)