The version now lives in project.godot (application/config/version) and Settings.version reads it from there. The Build workflow tests and exports on every push, and on main creates the tag, uploads the builds and creates the Gitea release when that version has no tag yet. This replaces gitea-release.yaml, which released when a branch named after the version was pushed. Godot setup moves into a local .gitea/actions/setup-godot action shared by the test and build jobs, and Godot is updated to 4.7.2 to match the editor the project is made with.
14 lines
452 B
GDScript
14 lines
452 B
GDScript
extends GdUnitTestSuite
|
|
|
|
|
|
func test_version_comes_from_project_settings() -> void:
|
|
assert_str(Settings.version).is_equal(
|
|
ProjectSettings.get_setting("application/config/version"))
|
|
|
|
|
|
func test_version_is_major_minor_patch() -> void:
|
|
# The release job tags and names builds with this version
|
|
var pattern: RegEx = RegEx.create_from_string("^\\d+\\.\\d+\\.\\d+$")
|
|
|
|
assert_object(pattern.search(Settings.version)).is_not_null()
|