Skip to content

Commit

Permalink
chore: remove deprecated set-output call
Browse files Browse the repository at this point in the history
  • Loading branch information
jackton1 committed Aug 31, 2023
1 parent d40fc5d commit fe75bcc
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,15 @@ CURRENT_TAG=${3:-$(git tag -l --sort=-version:refname "*.*" | grep -v "$NEW_TAG"
if [[ -z $CURRENT_TAG ]]; then
echo "::warning::Initial release detected unable to determine any tag diff."
echo "::warning::Setting release_type to $INPUT_INITIAL_RELEASE_TYPE."

if [[ -z "$GITHUB_OUTPUT" ]]; then
echo "::set-output name=release_type::$INPUT_INITIAL_RELEASE_TYPE"
else
echo "release_type=$INPUT_INITIAL_RELEASE_TYPE" >> "$GITHUB_OUTPUT"
fi
echo "release_type=$INPUT_INITIAL_RELEASE_TYPE" >> "$GITHUB_OUTPUT"
exit 0;
fi

echo "::debug::Calculating diff..."
PART=$(wget -O - https://raw.githubusercontent.com/fsaintjacques/semver-tool/3.3.0/src/semver | bash -s diff "${CURRENT_TAG//v/}" "${NEW_TAG//v/}")

if [[ -z "$GITHUB_OUTPUT" ]]; then
echo "::set-output name=release_type::$PART"
echo "::set-output name=old_version::$CURRENT_TAG"
echo "::set-output name=new_version::$NEW_TAG"
else
cat <<EOF >> "$GITHUB_OUTPUT"
cat <<EOF >> "$GITHUB_OUTPUT"
release_type=$PART
old_version=$CURRENT_TAG
new_version=$NEW_TAG
EOF
fi

0 comments on commit fe75bcc

Please sign in to comment.