From 392a2ac691336af3a909934160908c6ddf995e3c Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Thu, 11 Jan 2024 18:08:55 +0100 Subject: [PATCH] GHA: Add init_version action for GDExtension --- .github/actions/init-version-gdext/action.yml | 17 +++++++++++++++++ .github/workflows/gdextension_linux.yml | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 .github/actions/init-version-gdext/action.yml diff --git a/.github/actions/init-version-gdext/action.yml b/.github/actions/init-version-gdext/action.yml new file mode 100644 index 0000000..a71c451 --- /dev/null +++ b/.github/actions/init-version-gdext/action.yml @@ -0,0 +1,17 @@ +name: Setup version + +runs: + using: "composite" + steps: + - name: Set GDEXTENSION_VERSION & LIMBOAI_VERSION + shell: bash + run: | + cd godot-cpp + echo "GDEXTENSION_VERSION=$( (git describe --tags --exact-match HEAD || git rev-parse --short HEAD) | sed 's/\(.*\)-\(.*\)/\1/g' )" >> "$GITHUB_ENV" + cd ../limboai + echo "LIMBOAI_VERSION=$( (git describe --tags --exact-match HEAD || git rev-parse --short HEAD) | sed 's/\(.*\)-\(.*\)/\1/g' )" >> "$GITHUB_ENV" + + - name: Set NAME_PREFIX + shell: bash + run: echo "NAME_PREFIX=${GDEXTENSION_VERSION}.limboai+${LIMBOAI_VERSION}" >> "$GITHUB_ENV" + diff --git a/.github/workflows/gdextension_linux.yml b/.github/workflows/gdextension_linux.yml index 350223e..717174c 100644 --- a/.github/workflows/gdextension_linux.yml +++ b/.github/workflows/gdextension_linux.yml @@ -74,7 +74,7 @@ jobs: ref: ${{ inputs.limboai-treeish }} # Inits GODOT_VERSION, LIMBOAI_VERSION and NAME_PREFIX environment variables. - - uses: ./limboai/.github/actions/init-version + - uses: ./limboai/.github/actions/init-version-gdext # About sed see: https://github.com/godotengine/buildroot/issues/6 - name: Set up buildroot x86_64