67 lines
2.4 KiB
YAML
67 lines
2.4 KiB
YAML
name: Release Game Client
|
|
on:
|
|
push:
|
|
paths:
|
|
- '.gitea/workflows/build-game.yaml'
|
|
- '.gitea/**/*.sh'
|
|
tags:
|
|
- 'v*'
|
|
|
|
jobs:
|
|
export-windows:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: ubuntu:22.04
|
|
steps:
|
|
- name: Checkout Game
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Install Dependencies
|
|
run: apt-get update && apt-get install -y unzip wget zip
|
|
|
|
- name: Download Engine Templates
|
|
env:
|
|
# The specific engine version this game needs
|
|
ENGINE_HASH: "a90daf08c2bb52d6cb4ba67bb5cbe09d79b2c4eb"
|
|
# This string MUST match what your custom engine reports as its version
|
|
# Example: "4.3.stable" or "4.3.stable.mygame"
|
|
GODOT_VERSION_STRING: "4.6"
|
|
run: |
|
|
echo "Downloading templates..."
|
|
wget "https://gitea.212.63.210.91.nip.io/api/packages/seedlingattempt/generic/godot-templates/${ENGINE_HASH}/windows_templates.tpz"
|
|
|
|
echo "Installing templates..."
|
|
# Godot looks for templates in ~/.local/share/godot/export_templates/{VERSION}/
|
|
TEMPLATE_PATH="$HOME/.local/share/godot/export_templates/${GODOT_VERSION_STRING}"
|
|
mkdir -p "$TEMPLATE_PATH"
|
|
|
|
# Unzip our TPZ directly into that folder
|
|
unzip windows_templates.tpz -d "$TEMPLATE_PATH"
|
|
|
|
# Rename them to standard names if they aren't already
|
|
# (Your publish script already renamed them to windows_release_x86_64.exe, so this is fine!)
|
|
|
|
- name: Download Headless Editor (For Exporting)
|
|
env:
|
|
ENGINE_HASH: "a90daf08c2bb52d6cb4ba67bb5cbe09d79b2c4eb"
|
|
run: |
|
|
wget "https://gitea.212.63.210.91.nip.io/api/packages/seedlingattempt/generic/godot-editor-windows/${ENGINE_HASH}/godot-editor-windows.zip"
|
|
unzip godot-editor-windows.zip
|
|
chmod +x godot.windows.editor*.exe
|
|
# Create a simple alias
|
|
mv godot.windows.editor*.exe godot_headless
|
|
|
|
- name: Export Game
|
|
run: |
|
|
mkdir -p build/windows
|
|
|
|
echo "Exporting..."
|
|
cd src
|
|
# The preset name "Windows Desktop" must match your export_presets.cfg
|
|
./godot_headless --headless --export-release "Windows Desktop" ../build/windows/game.exe
|
|
|
|
- name: Upload Game Artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: windows-client
|
|
path: build/windows |