abarichello / godot-ci

Docker image to export Godot Engine games. Templates for Gitlab CI and GitHub Actions to deploy to GitLab Pages/GitHub Pages/Itch.io.
https://hub.docker.com/r/barichello/godot-ci
MIT License
758 stars 133 forks source link

fixed godot 4.1.3 pipeline #123

Open Bloham opened 1 year ago

Bloham commented 1 year ago

Hi,

I had a problem, but amazing friends helped me with my godot 4.1.3 export. And, as it took me several days to fix it (I am just a hobby dev) I though I leave my answer here for the next one that gets desperat.

name: "godot-ci export"
on: push

env:
  GODOT_VERSION: 4.1.3
  EXPORT_NAME: NoT
  PROJECT_PATH: NewsOfTomorrow

jobs:
  export-windows:
    name: Windows Export
    runs-on: ubuntu-20.04
    container:
      image: barichello/godot-ci:4.1.3
    steps:
      - name: Checkout
        uses: actions/checkout@v4
        with:
          lfs: true
      - name: Setup
        run: |
          mkdir -v -p ~/.local/share/godot/export_templates
          mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable
          cd ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable
          ls -l
      - name: Windows Build
        run: |
          mkdir -v -p build/windows
          ls -l
          godot -v --headless --export-release "Windows Desktop" ./build/windows/$EXPORT_NAME.exe
      - name: Upload Artifact
        uses: actions/upload-artifact@v3
        with:
          name: windows
          path: build/windows

  export-web:
    name: Web Export
    runs-on: ubuntu-20.04
    container:
      image: barichello/godot-ci:4.1.3
    steps:
      - name: Checkout
        uses: actions/checkout@v4
        with:
          lfs: true
      - name: Setup
        run: |
          mkdir -v -p ~/.local/share/godot/export_templates
          mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable
          cd ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable
          ls -l
      - name: Web Build
        run: |
          mkdir -v -p build/web
          godot -v --headless --export-release "HTML5" ./build/web/index.html
      - name: Upload Artifact
        uses: actions/upload-artifact@v3
        with:
          name: web
          path: build/web