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
759 stars 133 forks source link

mv: cannot stat '/root/.local/share/godot/templates/3.4.4.stable': No such file or directory #87

Closed onepersonhere closed 2 years ago

onepersonhere commented 2 years ago

Steps to reproduce: [in .yml]

name: "godot-ci export"
on: push

env:
  GODOT_VERSION: 3.4.4
  EXPORT_NAME: export_name

jobs:
  export-windows:
    name: Windows Export
    runs-on: ubuntu-20.04
    container:
      image: barichello/godot-ci:mono-3.4.4
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        with:
          lfs: true

      - name: Setup
        run: |
          mkdir -v -p ~/.local/share/godot/templates
          mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable
      - name: Windows Build
        run: |
          mkdir -v -p build/windows
          cd $EXPORT_NAME
          godot -v --export "Windows Desktop" ../build/windows/$EXPORT_NAME.exe
      - name: Upload Artifact
        uses: actions/upload-artifact@v1
        with:
          name: windows
          path: build/windows

Error @Setup

Run mkdir -v -p ~/.local/share/godot/templates
  mkdir -v -p ~/.local/share/godot/templates
  mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable
  shell: sh -e {0}
  env:
    GODOT_VERSION: 3.4.4
    EXPORT_NAME: test-project
mkdir: created directory '/github/home/.local'
mkdir: created directory '/github/home/.local/share'
mkdir: created directory '/github/home/.local/share/godot'
mkdir: created directory '/github/home/.local/share/godot/templates'
mv: cannot stat '/root/.local/share/godot/templates/3.4.4.stable': No such file or directory
Error: Process completed with exit code 1.
Calinou commented 2 years ago

The setup command should be adjusted in your YAML, as Mono export templates are installed to 3.4.4.stable.mono.

onepersonhere commented 2 years ago

The setup command should be adjusted in your YAML, as Mono export templates are installed to 3.4.4.stable.mono. @Calinou

Hi thanks for the prompt reply, it works after the edit however now I am getting the following error @Windows Build:

Run mkdir -v -p build/windows
  mkdir -v -p build/windows
  cd $EXPORT_NAME
  godot -v --export "Windows Desktop" ../build/windows/$EXPORT_NAME.exe
  shell: sh -e {0}
  env:
    GODOT_VERSION: 3.4.4
    EXPORT_NAME: test-project
mkdir: created directory 'build'
mkdir: created directory 'build/windows'
/__w/_temp/a7850ee6-95f7-4f6f-97d3-d78d05808777.sh: 2: cd: can't cd to test-project
Error: Process completed with exit code 2.

This is the current .yml:

name: "godot-ci export"
on: push

env:
  GODOT_VERSION: 3.4.4
  EXPORT_NAME: test-project

jobs:
  export-windows:
    name: Windows Export
    runs-on: ubuntu-20.04
    container:
      image: barichello/godot-ci:mono-3.4.4
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        with:
          lfs: true

      - name: print secrets
        run: |
          printf 'extends Node\nconst API_KEY := \"%s\"' $DEV_ENV_FILE > UI/Firebase/PrivateKey.gd
          cat UI/Firebase/PrivateKey.gd
        shell: bash
        env:
          DEV_ENV_FILE : ${{secrets.FIREBASE_API_KEY}}

      - name: Upload a Build Artifact
        uses: actions/upload-artifact@v2
        with:
          name: DEV_ENV_FILE
          path: UI/Firebase/PrivateKey.gd

      - name: Setup
        run: |
          cd /
          mkdir -v -p ~/.local/share/godot/templates
          mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable.mono ~/.local/share/godot/templates/${GODOT_VERSION}.stable.mono
      - name: Windows Build
        run: |
          mkdir -v -p build/windows
          cd $EXPORT_NAME
          godot -v --export "Windows Desktop" ../build/windows/$EXPORT_NAME.exe
      - name: Upload Artifact
        uses: actions/upload-artifact@v1
        with:
          name: windows
          path: build/windows
bend-n commented 2 years ago

Remove the cd $EXPORT_NAME if your game isnt in a subfolder

onepersonhere commented 2 years ago

Thanks!