GHA: Add init_version action for GDExtension

This commit is contained in:
Serhii Snitsaruk 2024-01-11 18:08:55 +01:00
parent c55c6553b2
commit 392a2ac691
2 changed files with 18 additions and 1 deletions

View File

@ -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"

View File

@ -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