butler-publish-itchio-action/entrypoint.sh
2020-03-08 05:26:36 -07:00

21 lines
475 B
Bash

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