Attempt project build
This commit is contained in:
@ -1,65 +1,78 @@
|
||||
name: Release Game Client
|
||||
name: Build Game
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
|
||||
jobs:
|
||||
export-windows:
|
||||
export-game:
|
||||
name: Export Game Client
|
||||
runs-on: ubuntu-latest
|
||||
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
|
||||
- name: Prepare Build Environment
|
||||
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"
|
||||
# 1. CONFIGURATION
|
||||
# The Git SHA of the Engine Build you want to use
|
||||
ENGINE_HASH: "e40804a4aec8fad5d3215766045ff7ba21e59ac9"
|
||||
|
||||
# The internal version string Godot expects for templates
|
||||
# CRITICAL: Run your custom editor, check "Help -> About" to find this exact string.
|
||||
# It is usually "4.3.stable.custom_build" unless you changed version.py
|
||||
GODOT_VERSION: "4.6.dev.double.custom_build"
|
||||
|
||||
# Registry details
|
||||
REGISTRY_URL: https://gitea.212.63.210.91.nip.io/api/packages/seedlingattempt/generic
|
||||
TOKEN: ${{ secrets.USER_PACKAGE_PASSWORD }}
|
||||
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 "--- 1. FETCHING TOOLS ---"
|
||||
|
||||
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"
|
||||
# Download Linux Editor (The Builder)
|
||||
echo "Downloading Editor..."
|
||||
wget --header="Authorization: token $TOKEN" \
|
||||
"$REGISTRY_URL/godot-editor-linux/$ENGINE_HASH/godot-editor-linux.zip"
|
||||
|
||||
# Unzip our TPZ directly into that folder
|
||||
unzip windows_templates.tpz -d "$TEMPLATE_PATH"
|
||||
# Download Templates (The Payload)
|
||||
echo "Downloading Templates..."
|
||||
wget --header="Authorization: token $TOKEN" \
|
||||
"$REGISTRY_URL/godot-templates/$ENGINE_HASH/templates.tpz"
|
||||
|
||||
echo "--- 2. INSTALLING ---"
|
||||
|
||||
# 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!)
|
||||
# Unzip Editor
|
||||
unzip -o godot-editor-linux.zip
|
||||
# Find the binary (it has no extension)
|
||||
EDITOR_BIN=$(find . -maxdepth 1 -type f -name "godot.linuxbsd.editor*" | head -n 1)
|
||||
chmod +x "$EDITOR_BIN"
|
||||
mv "$EDITOR_BIN" ./godot_headless
|
||||
echo "Editor ready: ./godot_headless"
|
||||
|
||||
- name: Download Headless Editor (For Exporting)
|
||||
env:
|
||||
ENGINE_HASH: "a90daf08c2bb52d6cb4ba67bb5cbe09d79b2c4eb"
|
||||
run: |
|
||||
mkdir godot_headless
|
||||
# Install Templates
|
||||
# Godot looks in ~/.local/share/godot/export_templates/{VERSION}/
|
||||
TEMPLATE_DIR="$HOME/.local/share/godot/export_templates/$GODOT_VERSION"
|
||||
mkdir -p "$TEMPLATE_DIR"
|
||||
|
||||
echo "Extracting templates to $TEMPLATE_DIR..."
|
||||
unzip -o templates.tpz -d "$TEMPLATE_DIR"
|
||||
|
||||
# Verify files are where Godot expects them
|
||||
ls -l "$TEMPLATE_DIR"
|
||||
|
||||
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.exe
|
||||
|
||||
- name: Export Game
|
||||
- name: Export Windows Client
|
||||
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
|
||||
# "Windows Desktop" must match the name in your export_presets.cfg
|
||||
./godot_headless --headless --export-release "Windows Desktop" build/windows/game.exe
|
||||
|
||||
- name: Upload Game Artifact
|
||||
- name: Export Linux Client
|
||||
run: |
|
||||
mkdir -p build/linux
|
||||
# "Linux/X11" must match the name in your export_presets.cfg
|
||||
./godot_headless --headless --export-release "Linux/X11" build/linux/game.x86_64
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: windows-client
|
||||
path: build/windows
|
||||
name: game-clients
|
||||
path: build/
|
||||
Reference in New Issue
Block a user