From 22d0bedada3b959dd9cd3e4e9fccc6b9702cd6e5 Mon Sep 17 00:00:00 2001 From: Damian Mee Date: Tue, 7 Apr 2020 04:01:02 +0800 Subject: [PATCH] Slight groupping fixes --- entrypoint.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 11067d7..76ca6db 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -4,8 +4,6 @@ set -e PKG="meeDamian/github-release@2.0" -echo "::group::Process inputs" - # ## Input verification # @@ -85,7 +83,6 @@ if [ -n "$release_id" ] && [ "$INPUT_ALLOW_OVERRIDE" != "true" ]; then exit 1 fi -echo "::endgroup::" echo "::group::Create Release" TMP="$(mktemp -d)" @@ -154,12 +151,13 @@ echo "::endgroup::" # ## Handle, and prepare assets # -echo "::group::Upload Assets" + if [ -z "$INPUT_FILES" ]; then >&2 echo "No assets to upload. All done." exit 0 fi +echo "::group::Upload Assets" assets="$HOME/assets" mkdir -p "$assets/" @@ -260,13 +258,14 @@ for asset in "$assets"/*; do done echo "::endgroup::" -echo "::group::Complete Release" if [ -n "$INPUT_DRAFT" ]; then >&2 echo "Draft status already correct. All done." exit 0 fi +echo "::group::Complete Release" + # Publish Release # docs ref: https://developer.github.com/v3/repos/releases/#edit-a-release status_code="$(curl -sS -X PATCH -d '{"draft": false}' \ @@ -282,6 +281,6 @@ if [ "$status_code" != "200" ]; then exit 1 fi ->&2 echo "All done." - echo "::endgroup::" + +>&2 echo "All done."