Files
godot/.gitea/workflows/build-engine.yaml
Olof Pettersson b21a22f4b9
Some checks failed
Build Godot Engine / Build Windows ${{ matrix.name }} (godot-windows-debug, Debug Template, no, template_debug) (push) Successful in 21m57s
Build Godot Engine / Build Windows ${{ matrix.name }} (godot-windows-editor, Editor, yes, editor) (push) Successful in 34m10s
Build Godot Engine / Build Windows ${{ matrix.name }} (godot-windows-release, Release Template, yes, template_release) (push) Successful in 22m45s
Build Godot Engine / publish (push) Failing after 24s
Try building with registry publishing
2025-12-02 21:09:23 +01:00

110 lines
3.6 KiB
YAML

name: Build Godot Engine
on:
push:
branches: [ "customized-moa" ]
jobs:
build-windows:
name: Build Windows ${{ matrix.name }}
runs-on: ubuntu-latest
# Run on Host (so Checkout works)
strategy:
fail-fast: false
matrix:
include:
- name: Editor
target: editor
production: yes
artifact_name: godot-windows-editor
- name: Debug Template
target: template_debug
production: no
artifact_name: godot-windows-debug
- name: Release Template
target: template_release
production: yes
artifact_name: godot-windows-release
steps:
- name: Checkout Source
uses: actions/checkout@v3
with:
submodules: recursive
- name: Compile with SCons
uses: docker://quay.io/buildah/stable
env:
REGISTRY: gitea.212.63.210.91.nip.io
OWNER: ${{ gitea.repository_owner }}
IMAGE_NAME: godot-builder-windows
IMAGE_TAG: 513d6efc259bb974ee2078adfa5f0994d0796a57
USERNAME: ${{ gitea.actor }}
PASSWORD: ${{ secrets.USER_PACKAGE_PASSWORD }}
# Build Arguments (From Matrix)
PLATFORM: windows
TARGET: ${{ matrix.target }}
PRODUCTION: ${{ matrix.production }}
with:
entrypoint: /bin/sh
# Just run the file! No messy YAML strings.
args: .gitea/workflows/scripts/build-with-buildah.sh
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.artifact_name }}
path: bin/*.exe
# --- JOB 2: PUBLISH (Serial) ---
publish:
# Only run if all builds succeed
needs: build-windows
runs-on: ubuntu-latest
steps:
# 1. Download ALL artifacts from the matrix jobs
- name: Download All Artifacts
uses: actions/download-artifact@v3
with:
path: dist
- name: Organize and Publish
env:
API_URL: https://gitea.212.63.210.91.nip.io/api/packages/${{ gitea.repository_owner }}/generic
TOKEN: ${{ secrets.USER_PACKAGE_PASSWORD }}
VERSION: ${{ gitea.sha }}
run: |
echo "Organizing artifacts..."
ls -R dist/
# Structure after download will look like:
# dist/godot-windows-editor/godot.windows.editor...exe
# dist/godot-windows-debug/godot.windows.template_debug...exe
# --- 1. PUBLISH EDITOR ---
echo "Publishing Editor..."
# Find the editor exe (using wildcard to be safe)
EDITOR_EXE=$(find dist/godot-windows-editor -name "*.exe")
curl --fail --user "${{ gitea.actor }}:$TOKEN" \
--upload-file "$EDITOR_EXE" \
"$API_URL/godot-editor-windows/$VERSION/godot-editor.exe"
# --- 2. PACKAGE TEMPLATES ---
echo "Zipping Templates..."
mkdir -p templates
# Copy debug and release templates to a single folder
# We rename them to simple names for the zip
cp dist/godot-windows-debug/*.exe templates/windows_debug_x86_64.exe
cp dist/godot-windows-release/*.exe templates/windows_release_x86_64.exe
# Zip them up
zip -j templates.tpz templates/*
echo "Publishing Templates..."
curl --fail --user "${{ gitea.actor }}:$TOKEN" \
--upload-file "templates.tpz" \
"$API_URL/godot-templates/$VERSION/windows_templates.tpz"
echo "✅ All packages published!"