tools for exporting godot projects via Github Actions
who needs pip
should close #6, as #6 cant happen if there is no pip, even if i cant repro
bendn 2022-12-06
parent 6e69a31 · commit c3d2572
-rw-r--r--.github/actions/setup-godot/action.yml3
-rwxr-xr-x.github/actions/setup-godot/parse.py10
2 files changed, 5 insertions, 8 deletions
diff --git a/.github/actions/setup-godot/action.yml b/.github/actions/setup-godot/action.yml
index 00c837b..b0df3d0 100644
--- a/.github/actions/setup-godot/action.yml
+++ b/.github/actions/setup-godot/action.yml
@@ -28,9 +28,6 @@ runs:
- name: Setup godot
if: steps.clean.outputs.clean == 'true'
run: |
- echo "::group::Pip install"
- python -m pip install packaging
- echo "::endgroup::"
echo "::group::Setup godot"
wget -q 'https://raw.githubusercontent.com/bend-n/godot-actions/main/.github/actions/setup-godot/parse.py' -O pv.py
diff --git a/.github/actions/setup-godot/parse.py b/.github/actions/setup-godot/parse.py
index 45874dc..669c585 100755
--- a/.github/actions/setup-godot/parse.py
+++ b/.github/actions/setup-godot/parse.py
@@ -1,9 +1,9 @@
#!/usr/bin/env python3
-from packaging.version import parse
from sys import argv
-parsed = parse(argv[1])
-release = argv[1].replace(
- parsed.base_version, '').strip('.')
-print(f"{parsed.base_version}.{release if release else 'stable'}")
+parsed = argv[1].split(".")
+release = "stable"
+if len(parsed[-1]) > 1:
+ release = parsed.pop(-1)
+print(f"{'.'.join(parsed)}.{release if release else 'stable'}")