Skip to content

Godot 4.x Export & Deploy #12

Godot 4.x Export & Deploy

Godot 4.x Export & Deploy #12

Workflow file for this run

name: "Godot 4.x Export & Deploy"
on:
workflow_dispatch:
env:
ITCHIO_USERNAME: shouples
ITCHIO_GAME: wranglersurvivors
GODOT_VERSION: 4.2.1
jobs:
export:
name: WebGL Export
runs-on: ubuntu-20.04
container:
image: barichello/godot-ci:4.2.1
steps:
- name: Checkout
uses: actions/checkout@v2
with:
lfs: true
- name: Download Godot Export Templates
run: |
wget "https://github.com/godotengine/godot/releases/download/${GODOT_VERSION}-stable/Godot_v${GODOT_VERSION}-stable_export_templates.tpz"
mkdir -v -p ~/.local/share/godot/templates/${GODOT_VERSION}.stable
tar -xzf "Godot_v${GODOT_VERSION}-stable_export_templates.tpz" -C ~/.local/share/godot/templates/${GODOT_VERSION}.stable
- name: Setup
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: Web Build
run: |
mkdir -v -p build/web
godot --headless --verbose --export-release "Web" ./build/web/index.html
- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: web
path: build/web
web-deploy:
name: Deploy - Itch.io (Web)
runs-on: ubuntu-latest
needs: export
steps:
- name: Download
uses: actions/download-artifact@v2.0.8
with:
name: web
path: build/web
- name: Publish
uses: KikimoraGames/itch-publish@v0.0.3
with:
butlerApiKey: ${{secrets.BUTLER_API_KEY}}
gameData: ./build/web
itchUsername: ${{env.ITCHIO_USERNAME}}
itchGameId: ${{ env.ITCHIO_GAME }}
buildChannel: web
buildNumber: ${{ github.sha }}