butler-publish-itchio-action/entrypoint.sh
2020-03-08 04:45:22 -07:00

20 lines
452 B
Bash

#!/bin/sh
set -e
mkdir -p ~/.config/itch
echo $BUTLER_CREDENTIALS > ~/.config/itch/butler_creds
versionArguement=""
if [ "$VERSION" != "" ]
then
versionArguement="--userversion ${VERSION}"
elif [ "$VERSION_FILE" != "" ]
then
versionArguement="--userversion-file ${VERSION_FILE}"
fi
echo "butler push \"$PACKAGE\" $ITCH_USER/$ITCH_GAME:$CHANNEL ${versionArguement}"
butler push "$PACKAGE" $ITCH_USER/$ITCH_GAME:$CHANNEL ${versionArguement}