-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wild swing at per-microgame PR builds
- Loading branch information
Showing
4 changed files
with
39 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,11 @@ jobs: | |
const path = require('path'); | ||
const script = require(path.resolve('.github/workflows/update-credits.js')); | ||
await script(github, context) | ||
- name: Setup Godot | ||
uses: lihop/setup-godot@v2 | ||
- name: Override config to launch specific microgame | ||
shell: bash | ||
run: godot -s .github/workflows/get_mg_scene_from_dir.gd --no-window "pixelart" | ||
- name: export with Godot Engine | ||
uses: firebelley/[email protected] | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
extends SceneTree | ||
|
||
|
||
func _init(): | ||
var mg_dir : String = OS.get_cmdline_args()[2] | ||
var def : MicrogameDefinition = Utility.find_microgame_definitions_in_dir( | ||
"res://microgames/" + mg_dir | ||
)[0] | ||
var mg_scene_path : String | ||
|
||
for filepath in Utility.list_all_files(def.resource_path.get_base_dir(), "tscn"): | ||
var scene_node = load(filepath).instance() | ||
var is_microgame_scene : bool = scene_node.get_class() == "Microgame" | ||
scene_node.free() | ||
|
||
if is_microgame_scene: | ||
mg_scene_path = filepath | ||
break | ||
|
||
var override_filepath := "override.cfg" | ||
|
||
ProjectSettings.set_setting("application/run/main_scene", mg_scene_path) | ||
ProjectSettings.save_custom(override_filepath) | ||
|
||
quit() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters