Skip to content

Merge branch 'main' of https://github.com/IES-Rafael-Alberti/GameOff2… #20

Merge branch 'main' of https://github.com/IES-Rafael-Alberti/GameOff2…

Merge branch 'main' of https://github.com/IES-Rafael-Alberti/GameOff2… #20

Workflow file for this run

name: Deploy to Itch.io
# Manually trigger by going to this workflow in the repository actions tab
on:
push:
branches:
- main
workflow_dispatch:
env:
BUTLER_API_KEY: ${{secrets.ITCHIO_API_KEY}} # Repository Settings -> Secrets and variables -> Actions -> New repository secret
ITCHIO_USERNAME: ${{secrets.ITCHIO_USERNAME}}
PROJECT_NAME: "fragmented-memory" # See README.md about project, channel, and export file naming conventions
jobs:
Build:
runs-on: ubuntu-latest
steps:
- name: Checkout Source Code
uses: actions/checkout@v4
- name: Get Godot Version
run: echo "GODOT_VERSION=$(grep '^config/features' project.godot | cut -d "\"" -f 2)" >> $GITHUB_ENV
- name: Download Godot
run: |
curl -L -o godot.zip https://downloads.tuxfamily.org/godotengine/4.3/Godot_v4.3-stable_linux.x86_64.zip
unzip godot.zip
mv Godot_v4.3-stable_linux.x86_64 godot
chmod +x godot
- name: Download Godot Export Templates
run: |
curl -L -o export_templates.zip https://downloads.tuxfamily.org/godotengine/4.3/Godot_v4.3-stable_export_templates.tpz
unzip export_templates.zip
- name: Install Export Templates
run: |
mkdir -p ~/.local/share/godot/export_templates/4.3.stable
mv ./templates/* ~/.local/share/godot/export_templates/4.3.stable
- name: Build
run: |
./godot --headless --export-release html
./godot --headless --export-release linux
./godot --headless --export-release windows
- name: Zip HTML Export
run: |
cd build/web
zip $PROJECT_NAME-html.zip -r -m *
cd -
- name: Save Artifacts for Next Job
uses: actions/upload-artifact@v4
with:
name: exports
path: build
Publish:
needs: Build
runs-on: ubuntu-latest
steps:
- name: Get Artifacts
uses: actions/download-artifact@v4
with:
name: exports
path: build
- name: Download Butler
run: |
curl -L -o butler.zip https://broth.itch.ovh/butler/linux-amd64/LATEST/archive/default
unzip butler.zip
chmod +x butler
./butler -V
- name: Login To Butler
run: ./butler login
- name: Push To Itch
run: |
./butler push ./build/web/$PROJECT_NAME-html.zip $ITCHIO_USERNAME/$PROJECT_NAME:html
./butler push ./build/linux/$PROJECT_NAME-linux.zip $ITCHIO_USERNAME/$PROJECT_NAME:linux
./butler push ./build/windows/$PROJECT_NAME-windows.exe $ITCHIO_USERNAME/$PROJECT_NAME:windows