From 810cb3ed200f1a12bddb62c12505d0277f4741c3 Mon Sep 17 00:00:00 2001 From: JulianEgbert Date: Thu, 27 Jul 2023 22:37:25 +0200 Subject: [PATCH] Merge master and remove exportBehavior for test --- .github/workflows/build-deploy.yml | 10 ++++++--- README.md | 25 +++------------------ prototypes/i6w1-jf-geometry-dash/level.tscn | 10 +-------- 3 files changed, 11 insertions(+), 34 deletions(-) diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index 3550b3f8..dc7f2f19 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -26,7 +26,12 @@ jobs: echo "GAME_DIR=$GAME_DIR" >> $GITHUB_OUTPUT echo "GAME_NAME=$GAME_NAME" >> $GITHUB_OUTPUT - name: Exit Check - run: if [[ $GAME_DIR = Error:* ]]; then exit 1; fi + run: | + if [[ $GAME_DIR = Error:* ]] + then + echo "::error::$GAME_DIR" + exit 1; + fi export-web: needs: find_export_game @@ -56,11 +61,10 @@ jobs: - name: Godot Web Build run: | ./scripts/export.sh $GAME_DIR - - name: Move game_info.json and thumbnail + - name: Move game_info.json and thumbnail.png run: | if [ -f ${GAME_DIR}/game_info.json ]; then mv ${GAME_DIR}/game_info.json build/web/game_info.json; fi if [ -f ${GAME_DIR}/thumbnail.png ]; then mv ${GAME_DIR}/thumbnail.png build/web/thumbnail.png; fi - if [ -f ${GAME_DIR}/thumbnail.jpg ]; then mv ${GAME_DIR}/thumbnail.jpg build/web/thumbnail.jpg; fi - name: Patch for Cross Origin Isolation and SharedArrayBuffer run: | mv scripts/enable-threads.js build/web/enable-threads.js diff --git a/README.md b/README.md index 74c6a7cf..0201edee 100644 --- a/README.md +++ b/README.md @@ -217,30 +217,11 @@ Before you can deploy your game check the following: 2. Make sure that all assets you use are inside your projects folder (e.g. `prototypes/myPrototype`). 3. Make sure that no filenames or folders have a `space` character in them. -#### game_info.json and thumbnail +#### ExportBehavior -In order to display detailed information of your game make sure to create a `game_info.json` file inside your projects folder. Your file could look like this: +To automatically export your game you have to add an `ExportBehavior` (do not rename this node!) anywhere in your game. There you can configure settings such as `title`, `description` and `authors` of the game, as well as how the `thumbnail.png` gets generated. -```json -{ - "title": "My Game", - "description": "The description of my game that is displayed in the overview.", - "authors": ["Developer 1", "Developer 2"], - "thumbnailType": "png" -} -``` - -Also make sure to have a thumbnail in your folder that matches the `thumbnailType` you provide (currently supported are `png` and `jpg`). - -For more details on the supported structure checkout the [documentation of gh-pages](https://github.com/hpi-swa-lab/godot-pronto/tree/gh-pages#readme). - -### Workflow - -You have to run the [Build & Deploy Game](https://github.com/hpi-swa-lab/godot-pronto/actions/workflows/build-deploy.yml) Action manually. As the branch to "use the workflow from" you select your branch that you developed on and that you prepared in the step above. - -In the next line you have to provide the name of the folder that your project is in (e.g. `myPrototype`). In the second line you can specify another path to this folder in case you didn't create your project inside the `prototypes` folder. - -Check if the workflow runs with any issues. If everything went well it should push your game to the `gh-pages` branch. This automatically triggers another workflow to rebuild the page. Wait until this workflow has completed before going to the next step. +If you then commit your game it will automatically trigger the workflow and deploy your game. If everything went well it should push your game to the `gh-pages` branch. This automatically triggers another workflow to rebuild the page. Wait until this workflow has completed before going to the next step. ### Testing diff --git a/prototypes/i6w1-jf-geometry-dash/level.tscn b/prototypes/i6w1-jf-geometry-dash/level.tscn index 541c5d7f..254c842e 100644 --- a/prototypes/i6w1-jf-geometry-dash/level.tscn +++ b/prototypes/i6w1-jf-geometry-dash/level.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=140 format=3 uid="uid://dgtvy2gh8t7ox"] +[gd_scene load_steps=139 format=3 uid="uid://dgtvy2gh8t7ox"] [ext_resource type="Script" path="res://addons/pronto/behaviors/PlaceholderBehavior.gd" id="1_k1a43"] [ext_resource type="Script" path="res://addons/pronto/behaviors/CameraShakeBehavior.gd" id="1_l4f51"] @@ -33,7 +33,6 @@ [ext_resource type="Texture2D" uid="uid://dljsmxh5c8f4e" path="res://prototypes/i6w1-jf-geometry-dash/flag.webp" id="31_beccf"] [ext_resource type="Texture2D" uid="uid://dc2jdack2pfjd" path="res://prototypes/i6w1-jf-geometry-dash/assets/green-pipe-tileset.png" id="32_juxy7"] [ext_resource type="Texture2D" uid="uid://2rl6ebjsk8xj" path="res://prototypes/i6w1-jf-geometry-dash/assets/base_ufo.png" id="33_oewmy"] -[ext_resource type="Script" path="res://addons/pronto/behaviors/ExportBehavior.gd" id="34_la0q0"] [sub_resource type="GDScript" id="GDScript_nqhmh"] script/source = "@tool @@ -1381,11 +1380,4 @@ position = Vector2(21803, -143) [node name="Node2D" parent="." instance=ExtResource("21_wcc3c")] position = Vector2(23640, -128) -[node name="ExportBehavior" type="Node2D" parent="."] -script = ExtResource("34_la0q0") -title = "Geometry Dash" -authors = PackedStringArray("Finn", "Julian") -description = "A Geometry Dash clone made in Godot/Pronot." -wait_seconds = 15 - [connection signal="pressed" from="Camera2D/StartButton" to="Camera2D/LevelComplete" method="_on_start_button_pressed"]