2021-12-02 10:10:12 +00:00
|
|
|
name: "Deploy signed MacOS to Itch.io"
|
|
|
|
|
|
|
|
on:
|
2022-01-21 12:53:56 +00:00
|
|
|
release:
|
|
|
|
types: [ created ]
|
2021-12-02 10:10:12 +00:00
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
env:
|
|
|
|
GODOT_VERSION: 3.4
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
export:
|
|
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
# Step taken from https://github.com/robpc/maze-test-game
|
|
|
|
- name: Build game
|
|
|
|
env:
|
|
|
|
PRESET: Mac OSX
|
|
|
|
BUILD_DIR: build/mac
|
|
|
|
run: |
|
|
|
|
wget -q https://downloads.tuxfamily.org/godotengine/${GODOT_VERSION}/Godot_v${GODOT_VERSION}-stable_osx.universal.zip
|
|
|
|
unzip Godot_v${GODOT_VERSION}-stable_osx.universal.zip
|
|
|
|
export XDG_DATA_HOME="$(pwd)/xdg_data_home"
|
|
|
|
export TEMPLATES_DIR="${XDG_DATA_HOME}/godot/templates/${GODOT_VERSION}.stable/"
|
|
|
|
mkdir -p ${TEMPLATES_DIR}
|
|
|
|
wget -q https://downloads.tuxfamily.org/godotengine/${GODOT_VERSION}/Godot_v${GODOT_VERSION}-stable_export_templates.tpz
|
|
|
|
unzip Godot_v${GODOT_VERSION}-stable_export_templates.tpz
|
|
|
|
mv templates/* ${TEMPLATES_DIR}
|
|
|
|
mkdir -p ${BUILD_DIR}
|
2021-12-02 10:16:25 +00:00
|
|
|
Godot.app/Contents/MacOS/Godot --export "${PRESET}"
|
2021-12-02 10:10:12 +00:00
|
|
|
- name: Install butler
|
|
|
|
run: |
|
|
|
|
# -L follows redirects
|
|
|
|
# -O specifies output name
|
2021-12-02 10:24:41 +00:00
|
|
|
curl -L -o butler.zip https://broth.itch.ovh/butler/darwin-amd64/LATEST/archive/default
|
2021-12-02 10:10:12 +00:00
|
|
|
unzip butler.zip
|
|
|
|
# GNU unzip tends to not set the executable bit even though it's set in the .zip
|
|
|
|
chmod +x butler
|
|
|
|
# just a sanity check run (and also helpful in case you're sharing CI logs)
|
|
|
|
./butler -V
|
|
|
|
- name: Itch.io deploy
|
|
|
|
env:
|
|
|
|
ITCHIO_USERNAME: ${{ secrets.ITCHIO_USERNAME }}
|
|
|
|
ITCHIO_GAME: ${{ secrets.ITCHIO_GAME }}
|
|
|
|
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }}
|
|
|
|
run: |
|
2021-12-02 10:28:01 +00:00
|
|
|
./butler push ./build/mac $ITCHIO_USERNAME/$ITCHIO_GAME:mac
|