name: Build Godot Engine on: push: branches: [ "customized-moa" ] create: tags: - 'v*' jobs: # --- BUILD JOBS (Parallel Matrix) --- build-engine: name: Build ${{ matrix.platform }} ${{ matrix.target }} runs-on: ubuntu-latest strategy: fail-fast: false matrix: include: # Windows (Double Precision) - platform: windows target: editor production: yes artifact_name: godot-windows-editor builder: windows - platform: windows target: template_debug production: no artifact_name: godot-windows-debug builder: windows - platform: windows target: template_release production: yes artifact_name: godot-windows-release builder: windows # Linux (Double Precision) - platform: linuxbsd target: editor production: yes artifact_name: godot-linux-editor builder: linux - platform: linuxbsd target: template_debug production: no artifact_name: godot-linux-debug builder: linux - platform: linuxbsd target: template_release production: yes artifact_name: godot-linux-release builder: linux steps: - name: Checkout Source uses: actions/checkout@v3 with: submodules: recursive - name: Make scripts executable run: chmod +x .gitea/workflows/scripts/*.sh - name: Compile (${{ matrix.platform }}) uses: docker://quay.io/buildah/stable env: # Registry Config REGISTRY: gitea.212.63.210.91.nip.io OWNER: ${{ gitea.repository_owner }} USERNAME: ${{ gitea.actor }} PASSWORD: ${{ secrets.USER_PACKAGE_PASSWORD }} # Which builder image to use? (windows or linux) BUILDER_TYPE: ${{ matrix.builder }} IMAGE_TAG: latest # SCons Arguments PLATFORM: ${{ matrix.platform }} TARGET: ${{ matrix.target }} PRODUCTION: ${{ matrix.production }} with: entrypoint: /bin/sh args: .gitea/workflows/scripts/build-with-buildah.sh - name: Upload Artifacts uses: actions/upload-artifact@v3 with: name: ${{ matrix.artifact_name }} # Uploads executables (Windows) and binaries (Linux has no extension) path: bin/godot.* # --- PUBLISH JOB (Runs after all builds finish) --- publish: needs: build-engine runs-on: ubuntu-latest steps: - name: Checkout Source uses: actions/checkout@v3 with: submodules: recursive - name: Download All Artifacts uses: actions/download-artifact@v3 with: path: dist - name: Make script executable run: chmod +x .gitea/workflows/scripts/publish.sh - name: Package and Publish uses: docker://alpine:latest env: API_URL: https://gitea.212.63.210.91.nip.io/api/packages/${{ gitea.repository_owner }}/generic TOKEN: ${{ secrets.USER_PACKAGE_PASSWORD }} ACTOR: ${{ gitea.actor }} VERSION: ${{ gitea.sha }} with: entrypoint: /bin/sh args: .gitea/workflows/scripts/publish.sh