From 3acd2108268b5d27aecad8068782a5d1a6b9418d Mon Sep 17 00:00:00 2001 From: "olof.pettersson" Date: Wed, 3 Dec 2025 16:16:41 +0100 Subject: [PATCH] Simpler setup script --- .gitea/workflows/build-game.yaml | 51 +++++++++++++++----------------- 1 file changed, 24 insertions(+), 27 deletions(-) diff --git a/.gitea/workflows/build-game.yaml b/.gitea/workflows/build-game.yaml index ef80612..1480d12 100644 --- a/.gitea/workflows/build-game.yaml +++ b/.gitea/workflows/build-game.yaml @@ -12,37 +12,34 @@ jobs: - name: Install Dependencies run: apt-get update && apt-get install -y unzip wget zip - - name: Download Engine Templates + # 2. Setup: Download the Engine & Templates from your Registry + # You built these in the previous pipeline! + - name: Setup Custom Godot 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" + # The version of the engine your game uses + ENGINE_VERSION: "a90daf08c2bb52d6cb4ba67bb5cbe09d79b2c4eb" + REGISTRY: "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 "Fetching Editor..." + wget --header="Authorization: token $TOKEN" \ + "$REGISTRY/godot-editor-windows/$ENGINE_VERSION/godot-editor-windows.zip" + unzip -o godot-editor-windows.zip - 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 + # Make the editor executable chmod +x godot.windows.editor*.exe - # Create a simple alias - mv godot.windows.editor*.exe godot_headless + mv godot.windows.editor*.exe godot_headless.exe + + echo "Fetching Templates..." + wget --header="Authorization: token $TOKEN" \ + "$REGISTRY/godot-templates/$ENGINE_VERSION/windows_templates.tpz" + + # Install templates to the standard path Godot expects + # Note: The folder name MUST match the version string in your custom engine + # (Run your custom editor locally and check 'About' to see the exact string) + TEMPLATE_PATH="$HOME/.local/share/godot/export_templates/4.3.stable.custom_build" + mkdir -p "$TEMPLATE_PATH" + unzip windows_templates.tpz -d "$TEMPLATE_PATH" - name: Export Game run: |