58 lines
1.5 KiB
YAML
58 lines
1.5 KiB
YAML
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 }}
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: barichello/godot-ci:4.3
|
|
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 export templates
|
|
run: |
|
|
mkdir -p ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable
|
|
cp -r /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable/* \
|
|
~/.local/share/godot/export_templates/${GODOT_VERSION}.stable/ || true
|
|
|
|
- name: Import project (build resource cache)
|
|
run: godot --headless --import
|
|
continue-on-error: true
|
|
|
|
- name: Export ${{ matrix.platform }}
|
|
run: |
|
|
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
|