Skip to content

Commit 4a480b3

Browse files
committed
Add release workflow for automated GitHub releases
1 parent 2c43c95 commit 4a480b3

File tree

2 files changed

+43
-4
lines changed

2 files changed

+43
-4
lines changed

.github/copilot-instructions.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ FlowKit is a Godot 4 editor plugin for visual event-driven programming, inspired
77
**Plugin Structure**: FlowKit is a dual-mode system with editor-time visual authoring and runtime execution:
88

99
- **Editor side** (`flowkit.gd`, `ui/`): Godot `@tool` plugin that adds a bottom panel for visual event editing
10-
- **Runtime side** (`runtime/flowkit_engine.gd`): Autoloaded singleton that executes event sheets during gameplay
10+
- **Runtime side** (`runtime/flowkit_engine.gd`, `runtime/flowkit_system.gd`): Autoloaded singletons that execute event sheets during gameplay
1111
- **Registry system** (`registry.gd`): Auto-discovers and instantiates provider scripts at plugin load
12+
- **Generator system** (`generator.gd`): Automatically generates actions, conditions, and events from scene node types and their properties/methods/signals
1213

1314
**Event Sheet Model**: Scene-specific `.tres` resources saved to `saved/event_sheet/{scene_name}.tres`:
1415

@@ -33,10 +34,11 @@ FKEventSheet
3334

3435
**Creating New Providers**:
3536

36-
1. Add `.gd` file to `actions/{NodeType}/`, `conditions/`, or `events/`
37+
1. Add `.gd` file to `actions/{NodeType}/`, `conditions/{NodeType}/`, or `events/{NodeType}/`
3738
2. Extend `FKAction`, `FKCondition`, or `FKEvent`
38-
3. Implement required methods (see `actions/Node/print.gd` for reference)
39+
3. Implement required methods (see base classes in `resources/` directory)
3940
4. Registry auto-discovers on plugin reload (no manual registration needed)
41+
5. **Alternative**: Use `generator.gd` to auto-generate providers from scene nodes - it introspects node properties, methods, and signals to create boilerplate providers
4042

4143
**Event Sheet Execution** (runtime):
4244

@@ -135,12 +137,16 @@ Each modal step stores context in `pending_*` variables (e.g., `pending_action_n
135137

136138
## Key Integration Points
137139

138-
**Runtime Autoload**: `FlowKitEngine` added as singleton in `_enter_tree()`:
140+
**Runtime Autoloads**: Two singletons added in `_enter_tree()`:
139141

140142
```gdscript
143+
add_autoload_singleton("FlowKitSystem", "res://addons/flowkit/runtime/flowkit_system.gd")
141144
add_autoload_singleton("FlowKit", "res://addons/flowkit/runtime/flowkit_engine.gd")
142145
```
143146

147+
- `FlowKitSystem`: System-level utilities and global state management
148+
- `FlowKit`: Main execution engine for event sheet processing
149+
144150
**Scene Detection**: Engine uses deferred `_check_current_scene()` + `_process()` polling to handle scene changes robustly (works even if scene loads before engine ready).
145151

146152
**UI-Resource Sync**: Editor saves via `ResourceSaver.save()`, then calls `_display_sheet()` to rebuild UI from saved resource (single source of truth).
@@ -158,3 +164,5 @@ add_autoload_singleton("FlowKit", "res://addons/flowkit/runtime/flowkit_engine.g
158164
- Resource schemas: `resources/event_sheet.gd`, `resources/event_block.gd`
159165
- Editor workflow: `ui/editor.gd` (\_on_add_action_button_pressed → \_create_action_with_expressions)
160166
- Runtime loop: `runtime/flowkit_engine.gd` (\_run_sheet)
167+
- Generator system: `generator.gd` (auto-generates providers from node introspection)
168+
- Expression evaluator: `runtime/expression_evaluator.gd` (evaluates GDScript expressions in action/condition inputs)

.github/workflows/release.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout master branch
14+
uses: actions/checkout@v4
15+
with:
16+
ref: master
17+
18+
- name: Create release zip
19+
run: |
20+
# Zip the addon at root level (not in a subdirectory)
21+
# This ensures the addon structure is preserved for Godot
22+
zip -r release.zip . -x '*.git*'
23+
24+
- name: Create Release
25+
uses: softprops/action-gh-release@v1
26+
with:
27+
files: release.zip
28+
draft: false
29+
prerelease: false
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)