name: Build on: push: branches: [main] pull_request: branches: [main] workflow_dispatch: env: GODOT_VERSION: "4.3" PROJECT_NAME: chemo-sim jobs: build: name: Export ${{ matrix.platform }} # Node-capable image so JS actions (checkout, upload-artifact) work on Gitea act_runner. runs-on: ubuntu-latest strategy: fail-fast: false matrix: include: - platform: windows preset: "Windows Desktop" output: chemo-sim.exe - platform: linux preset: "Linux" output: chemo-sim.x86_64 steps: - name: Checkout uses: actions/checkout@v4 with: lfs: true - name: Install Godot ${{ env.GODOT_VERSION }} + export templates run: | set -euxo pipefail GODOT_REL="${GODOT_VERSION}-stable" BASE="https://github.com/godotengine/godot/releases/download/${GODOT_REL}" # Editor (headless export uses the editor binary) curl -fSL -o godot.zip "${BASE}/Godot_v${GODOT_REL}_linux.x86_64.zip" unzip -o godot.zip mv "Godot_v${GODOT_REL}_linux.x86_64" /usr/local/bin/godot chmod +x /usr/local/bin/godot godot --version # Export templates curl -fSL -o templates.tpz "${BASE}/Godot_v${GODOT_REL}_export_templates.tpz" unzip -o templates.tpz TPL_DIR="${HOME}/.local/share/godot/export_templates/${GODOT_VERSION}.stable" mkdir -p "${TPL_DIR}" mv templates/* "${TPL_DIR}/" - name: Import project (build resource cache) run: godot --headless --import continue-on-error: true - name: Export ${{ matrix.platform }} run: | set -euxo pipefail mkdir -p "build/${{ matrix.platform }}" godot --headless --export-release "${{ matrix.preset }}" "build/${{ matrix.platform }}/${{ matrix.output }}" - name: Upload artifact uses: actions/upload-artifact@v3 with: name: ${{ env.PROJECT_NAME }}-${{ matrix.platform }} path: build/${{ matrix.platform }}/ if-no-files-found: error retention-days: 14