Attempt automated build
This commit is contained in:
12
.gitea/scripts/setup_editor.sh
Normal file
12
.gitea/scripts/setup_editor.sh
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Config: The exact engine version this game project depends on
|
||||||
|
# You update this hash when you upgrade the engine
|
||||||
|
ENGINE_VERSION="8bf2d40"
|
||||||
|
|
||||||
|
echo "Fetching Custom Editor [${ENGINE_VERSION}]..."
|
||||||
|
|
||||||
|
# Download from your Registry
|
||||||
|
curl -O "https://gitea.212.63.210.91.nip.io/api/packages/seedlingattempt/generic/godot-editor-windows/${ENGINE_VERSION}/godot-editor-windows.zip"
|
||||||
|
|
||||||
|
unzip -o godot-editor-windows.zip
|
||||||
|
echo "Editor ready! Run ./godot.windows.editor...exe to start."
|
||||||
67
.gitea/workflows/build-game.yaml
Normal file
67
.gitea/workflows/build-game.yaml
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
name: Release Game Client
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- '.gitea/workflows/build-game.yaml'
|
||||||
|
- '.gitea/**/*.sh'
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
export-windows:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
# Use a lightweight standard image, or your existing builder if you want tools
|
||||||
|
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..."
|
||||||
|
# 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
|
||||||
Reference in New Issue
Block a user