-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include web export release templates #115
Comments
Have you generated an export template in the editor? I think 4 still uses a
dot cfg. You need that in your project root.
Do the export process up to installing the export templates, I believe that will trigger the editor to generate a dot cfg configuration. Then, commit the cfg to your repository and rerun the action: https://docs.godotengine.org/en/stable/tutorials/export/exporting_projects.html
…On Fri, Jul 7, 2023, 2:03 AM Matheus Fillipe ***@***.***> wrote:
My CI fails with:
ERROR: Cannot export project with preset "Web" due to configuration errors:
No export template found at the expected path:
/github/home/.local/share/godot/export_templates/4.0.3.stable/web_debug.zip
No export template found at the expected path:
/github/home/.local/share/godot/export_templates/4.0.3.stable/web_release.zip
Here is my yaml:
name: "godot-ci export"
on: push
env:
GODOT_VERSION: 4.0.3
jobs:
export-web:
name: Web Export
runs-on: ubuntu-20.04
container:
image: barichello/godot-ci:4.0.3
steps:
- name: Checkout
uses: ***@***.***
with:
lfs: true
- name: WhatDoWeHave
run: ls /root/.local/share/godot/templates/
- 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: Web Build
run: |
mkdir -v -p build/web
godot -v --headless --export-release "Web" build/web/index.html
- name: Upload Artifact
uses: ***@***.***
with:
name: web
path: build/web
- name: Install rsync 📚
run: |
apt-get update && apt-get install -y rsync
- name: Deploy to GitHub Pages 🚀
uses: ***@***.***
with:
folder: build/web # The folder the action should deploy.
Ive noticed there is only 4.0.3.stable. Am I doing something wrong? Is
there a better example of how to do this for gotot 4?
—
Reply to this email directly, view it on GitHub
<#115>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQQSUCWTIWKEJKOXAXQ5BWDXO7GHXANCNFSM6AAAAAA2BQ7HB4>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
That is already with the templates exported. I have created and exported the cfg. Running it locally works:
|
What is the output of this step:
|
The output of that step is
|
Looks like you figured out the error? Well done! What steps did you take for the fix? |
Getting the same error for linux:
Run: But I am trying with Godot 4.1. Workflow can be found here: |
ok, the error is telling us that no templates are present when they should be. I haven't been using godot 4 yet but I use CI for Godot 3 often. I'm going to investigate a little further. It looks like this is happening for both Godot 4.1 and 4.0.3. If you add this task what is its output:
|
(I don't want to hijack the issue if I am not looking at the same thing) But I already did so:
|
Seems like there is something going wrong with the copy, When I do a "ls" of the final directory, it fails:
|
- name: listTemplates
run: ls /root/.local/share/godot/templates/*/
|
I think I've found the issue: This path should be: Next line needs to be adjusted as well. Testing it right now. |
It did fix the initial error but a new one popped up:
|
Got it working, thanks for help: I needed to adjust my path of the output dir: |
That fixes the issue, I also have other issues now: https://github.com/matheusfillipe/duckhunt/actions/runs/5489488472/jobs/10003706813 This is godot 4 specific godotengine/godot#63093 |
Yes it does! |
Make sure read and write permissions are set on workflows: |
Thanks a lot @loteque and @jonathaneeckhout. All is working now. Also had to set to deploy from a branch: name: "godot-ci export"
on: push
env:
GODOT_VERSION: 4.0.3
jobs:
export-web:
name: Web Export
runs-on: ubuntu-20.04
container:
image: barichello/godot-ci:4.0.3
steps:
- name: Checkout
uses: actions/checkout@v2
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
- name: Web Build
run: |
mkdir -v -p build/web
godot -v --headless --export-release "Web" build/web/index.html
- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: web
path: build/web
- name: Install rsync 📚
run: |
apt-get update && apt-get install -y rsync
- name: Deploy to GitHub Pages 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: build/web # The folder the action should deploy.
I think is not possible to host games on github pages anymore though: Don't know if they have such configuration. |
Anyway thats another issue and nothing to do with what this workflow should do. Feel free to close this one! |
Based on the comments here I have a very hacky workaround for that: name: "godot-ci export"
on: push
env:
GODOT_VERSION: 4.0.3
jobs:
export-web:
name: Web Export
runs-on: ubuntu-20.04
container:
image: barichello/godot-ci:4.0.3
steps:
- name: Checkout
uses: actions/checkout@v2
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
- name: Web Build
run: |
mkdir -v -p build/web
godot -v --headless --export-release "Web" build/web/index.html
- name: Install rsync 📚
run: |
apt-get update && apt-get install -y rsync curl
- name: Patch for Cross Origin Isolation and SharedArrayBuffer
run: |
cd build/web/
curl https://raw.githubusercontent.com/josephrocca/clip-image-sorter/92b108dc670d0b56bd6b72963b0e86c4c862412e/enable-threads.js --output enable-threads.js
sed -i 's|headers.set("Cross-Origin-Embedder-Policy", "credentialless")|headers.set("Cross-Origin-Embedder-Policy", "require-corp")|g' enable-threads.js
sed -i 's|<script src="index.js"></script>|<script src="enable-threads.js"></script><script src="index.js"></script>|g' index.html
- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: web
path: build/web
- name: Deploy to GitHub Pages 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: build/web # The folder the action should deploy.
The game loads after taking quite a while to load but loads. |
@matheusfillipe can you open a new issue concerning the crossorigin requirements? That seems like something we should make visible. |
My CI fails with:
Here is my yaml:
Ive noticed there is only
4.0.3.stable
. Am I doing something wrong? Is there a better example of how to do this for gotot 4?The text was updated successfully, but these errors were encountered: