builds godot
Diffstat (limited to '.github/actions/get-version/action.yml')
-rw-r--r--.github/actions/get-version/action.yml15
1 files changed, 12 insertions, 3 deletions
diff --git a/.github/actions/get-version/action.yml b/.github/actions/get-version/action.yml
index 29cd150..fe72950 100644
--- a/.github/actions/get-version/action.yml
+++ b/.github/actions/get-version/action.yml
@@ -5,14 +5,19 @@ runs:
using: "composite"
steps:
- name: Setup
- uses: bend-n/godot-builds/.github/actions/setup@main
+ uses: bend-n/godot-builds/.github/actions/[email protected]
with:
ref: ${{ env.ref }}
- name: Get version
run: |
cd godot
- echo 'print(f"{major}.{minor}")' >> version.py
+ # i could not get heredocs to work here
+ echo 'if patch:' >> version.py
+ echo ' print(f"{major}.{minor}.{patch}")' >> version.py
+ echo 'else:' >> version.py
+ echo ' print(f"{major}.{minor}")' >> version.py
+
echo "version-name=$(python version.py)" >> $GITHUB_ENV
version=$(python version.py)
@@ -23,8 +28,12 @@ runs:
release=$(python version.py)
release_name="$version"
- [[ ${release} == 'stable' ]] || release_name+=${release}
+ [[ $release == 'stable' ]] || release_name+=".${release}"
echo "release-name=$release_name" >> $GITHUB_ENV
+
+ prerelease="true"
+ [[ $release == 'stable' ]] && prerelease="false"
+ echo "prerelease=${prerelease}" >> $GITHUB_ENV
shell: bash
- name: Post get version