2021-11-11 23:15:08 +00:00
|
|
|
name: "Deploy to Itch.io"
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ main ]
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
env:
|
|
|
|
GODOT_VERSION: 3.4
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
export:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-11-17 19:47:39 +00:00
|
|
|
target: [[windows, Windows Desktop], [linux, Linux/X11], [html, HTML5]]
|
2021-11-11 23:15:08 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
|
|
|
image: barichello/godot-ci:3.4
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup export templates
|
|
|
|
run: |
|
|
|
|
mkdir -v -p ~/.local/share/godot/templates
|
|
|
|
mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable
|
|
|
|
- name: Build game
|
|
|
|
env:
|
|
|
|
EXPORT_DIR_NAME: ${{ matrix.target[0] }}
|
|
|
|
EXPORT_TARGET_NAME: ${{ matrix.target[1] }}
|
|
|
|
run: |
|
|
|
|
mkdir -v -p build/$EXPORT_DIR_NAME
|
|
|
|
godot -v --export "$EXPORT_TARGET_NAME"
|
|
|
|
- name: Itch.io deploy
|
|
|
|
env:
|
|
|
|
EXPORT_DIR_NAME: ${{ matrix.target[0] }}
|
2021-11-11 23:19:10 +00:00
|
|
|
ITCHIO_USERNAME: ${{ secrets.ITCHIO_USERNAME }}
|
|
|
|
ITCHIO_GAME: ${{ secrets.ITCHIO_GAME }}
|
|
|
|
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }}
|
2021-11-11 23:15:08 +00:00
|
|
|
run: |
|
|
|
|
butler push ./build/$EXPORT_DIR_NAME $ITCHIO_USERNAME/$ITCHIO_GAME:$EXPORT_DIR_NAME
|
2021-11-17 19:47:39 +00:00
|
|
|
|
|
|
|
export-mac:
|
2021-11-17 19:50:47 +00:00
|
|
|
runs-on: macos-latest
|
2021-11-17 19:47:39 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install godot
|
|
|
|
run: brew install --cask godot
|
|
|
|
- name: Install butler
|
|
|
|
run: brew install --cask butler
|
|
|
|
- name: Setup export templates
|
|
|
|
run: |
|
|
|
|
mkdir -v -p ~/.local/share/godot/templates
|
|
|
|
mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable
|
|
|
|
- name: Build game
|
|
|
|
env:
|
|
|
|
EXPORT_DIR_NAME: ${{ matrix.target[0] }}
|
|
|
|
EXPORT_TARGET_NAME: ${{ matrix.target[1] }}
|
|
|
|
run: |
|
|
|
|
mkdir -v -p build/$EXPORT_DIR_NAME
|
|
|
|
godot -v --export "$EXPORT_TARGET_NAME"
|
|
|
|
- name: Itch.io deploy
|
|
|
|
env:
|
|
|
|
EXPORT_DIR_NAME: ${{ matrix.target[0] }}
|
|
|
|
ITCHIO_USERNAME: ${{ secrets.ITCHIO_USERNAME }}
|
|
|
|
ITCHIO_GAME: ${{ secrets.ITCHIO_GAME }}
|
|
|
|
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }}
|
|
|
|
run: |
|
|
|
|
butler push ./build/$EXPORT_DIR_NAME $ITCHIO_USERNAME/$ITCHIO_GAME:$EXPORT_DIR_NAME
|