Skip to content

Commit

Permalink
add groupings
Browse files Browse the repository at this point in the history
  • Loading branch information
meeDamian committed Apr 6, 2020
1 parent c29afcd commit 1d6696e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ set -e

PKG="meeDamian/[email protected]"

echo "::group::Process inputs"

#
## Input verification
#
Expand Down Expand Up @@ -83,6 +85,9 @@ if [ -n "$release_id" ] && [ "$INPUT_ALLOW_OVERRIDE" != "true" ]; then
exit 1
fi

echo "::endgroup::"
echo "::group::Create Release"

TMP="$(mktemp -d)"

#
Expand Down Expand Up @@ -144,7 +149,7 @@ release_id="$(jq '.id' < "$TMP/$method.json")"

# Make release ID available to other steps in user's workflow
echo "::set-output name=release_id::$release_id"

echo "::endgroup::"

#
## Handle, and prepare assets
Expand Down Expand Up @@ -255,13 +260,13 @@ 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


# Publish Release
# docs ref: https://developer.github.com/v3/repos/releases/#edit-a-release
status_code="$(curl -sS -X PATCH -d '{"draft": false}' \
Expand All @@ -278,3 +283,5 @@ if [ "$status_code" != "200" ]; then
fi

>&2 echo "All done."

echo "::endgroup::"

0 comments on commit 1d6696e

Please sign in to comment.