Adds Itch.io Butler

This commit is contained in:
Julien Deswaef
2020-01-13 20:07:57 +01:00
committed by BARICHELLO
parent 05e01e9112
commit 6df44cac72
4 changed files with 44 additions and 0 deletions

View File

@@ -6,6 +6,8 @@ stages:
variables:
EXPORT_NAME: game-off
ITCHIO_USERNAME: user
ITCHIO_GAME: game
before_script:
- mkdir -v -p build/linux
@@ -77,3 +79,25 @@ pages:
artifacts:
paths:
- public
# Itch.io Deploy
itchio:linux:
stage: deploy
script:
- butler push $EXPORT_NAME $ITCHIO_USERNAME/$ITCHIO_GAME:linux64
dependencies:
- linux
itchio:windows:
stage: deploy
script:
- butler push $EXPORT_NAME.exe $ITCHIO_USERNAME/$ITCHIO_GAME:windows
dependencies:
- windows
itchio:macosx:
stage: deploy
script:
- butler push $EXPORT_NAME.zip $ITCHIO_USERNAME/$ITCHIO_GAME:mac64
dependencies:
- mac

View File

@@ -23,3 +23,9 @@ RUN wget https://downloads.tuxfamily.org/godotengine/${GODOT_VERSION}/Godot_v${G
&& unzip Godot_v${GODOT_VERSION}-stable_export_templates.tpz \
&& mv templates/* ~/.local/share/godot/templates/${GODOT_VERSION}.stable \
&& rm -f Godot_v${GODOT_VERSION}-stable_export_templates.tpz Godot_v${GODOT_VERSION}-stable_linux_headless.64.zip
ADD getbutler.sh /opt/butler/getbutler.sh
RUN bash /opt/butler/getbutler.sh
RUN /opt/butler/bin/butler -V
ENV PATH="/opt/butler/bin:${PATH}"

View File

@@ -31,5 +31,6 @@ Delete the `pages` job and set the following **Variables** in the GitLab CI/CD p
| $REMOTE_URL | The `git remote` where the web export will be hosted (in this case GitHub), it should contain your [deploy/personal access token](https://github.com/settings/tokens)|`https://<github username>:<deploy token>@github.com/<username>/<repository>.git`
| $GIT_EMAIL | Git email of the account that will commit to the `gh-pages` branch. | `artur@barichello.me`
| $GIT_USERNAME | Username of the account that will commit to the `gh-pages` branch. | `abarichello`
| $BUTLER_API_KEY | [Itch.io authentification key](https://itch.io/user/settings/api-keys). | `gH89Cd15UHqWBpyU8Ri42Q`
Others variables are set automatically by the `gitlab-runner`, see the documentation for [predefined variables](https://docs.gitlab.com/ee/ci/variables/predefined_variables.html).<br>

13
getbutler.sh Normal file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/bash
mkdir -p /opt/butler/bin
cd /opt/butler/bin
wget -O butler.zip https://broth.itch.ovh/butler/linux-amd64/LATEST/archive/default
unzip butler.zip
# GNU unzip tends to not set the executable bit even though it's set in the .zip
chmod +x butler
export PATH=/opt/butler/bin/:$PATH
cd ~