From b21a22f4b999768148722e452df571d0dd8aa77d Mon Sep 17 00:00:00 2001 From: Olof Pettersson Date: Tue, 2 Dec 2025 21:09:23 +0100 Subject: [PATCH] Try building with registry publishing --- .gitea/workflows/build-engine.yaml | 55 +++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build-engine.yaml b/.gitea/workflows/build-engine.yaml index cf55358822d..2d62f2b80f1 100644 --- a/.gitea/workflows/build-engine.yaml +++ b/.gitea/workflows/build-engine.yaml @@ -54,4 +54,57 @@ jobs: uses: actions/upload-artifact@v3 with: name: ${{ matrix.artifact_name }} - path: bin/*.exe \ No newline at end of file + 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!" \ No newline at end of file