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

Export path issue using github workflow #144

Closed FlippantKitten closed 1 month ago

FlippantKitten commented 5 months ago

When using Github workflows there is an issue with the export path.

When trying to build my Mono project. (after manually adding .net dependencies using the following code block

      - name: .NET installation
        uses: actions/setup-dotnet@v3
        with:
          dotnet-version: 6.0.x

The following error is returned on compilation:

ERROR: Prepare Template: The given export path doesn't exist.
   at: add_message (editor/export/editor_export_platform.h:182)
ERROR: Project export for preset "Windows Desktop" failed.
   at: _fs_changed (editor/editor_node.cpp:994)

The project it was ran on was in the root of the repository (so no subfolder). This required the removal of the following line from the workflow: cd $PROJECT_PATH There was no mention of this in the README. My suggestion is to at least add a mention to it (along with the manual adding of the .net dependcies).

This did not fix the issue. After some further digging I managed to fix my build by changing the export path from godot --headless --verbose --export-release "Windows Desktop" ../build/mac/$EXPORT_NAME.zip to godot --headless --verbose --export-release "Windows Desktop" ./build/mac/$EXPORT_NAME.zip

These steps combined have fixed my building issues for my Mono project that is set up in the root of my repository. I am unsure exactly if the project being in the root is the cause of the error. I added any information that might help narrow down the actual problem.

DarkyOMG commented 1 month ago

Thanks for this post. I believe the .. is only needed, if your root folder is not the project folder. So removing cd $PROJECT_PATH and replacing .. with . should both be done when having the project at the root.

Calinou commented 1 month ago

@FlippantKitten @DarkyOMG Please take a look at https://github.com/abarichello/godot-ci/pull/157 🙂