GHA: Adjust versioning of GDExtension build

This commit is contained in:
Serhii Snitsaruk 2024-01-11 18:50:52 +01:00
parent 392a2ac691
commit 8cb8f65469
2 changed files with 11 additions and 3 deletions

View File

@ -7,11 +7,18 @@ runs:
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"
GDEXTENSION_VERSION=$( (git describe --tags --exact-match HEAD || git rev-parse --short HEAD) | sed 's/\(.*\)-\(.*\)/\1/g' )
if [[ ${GDEXTENSION_VERSION} == godot-* ]]; then
GDEXTENSION_VERSION=${GDEXTENSION_VERSION#"godot-"}
fi
echo "GDEXTENSION_VERSION=${GDEXTENSION_VERSION}" >> "$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"
run: echo "NAME_PREFIX=gdextension-${GDEXTENSION_VERSION}.limboai+${LIMBOAI_VERSION}" >> "$GITHUB_ENV"

View File

@ -64,6 +64,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: godotengine/godot-cpp
fetch-tags: true
path: godot-cpp
ref: ${{ inputs.godot-cpp-version }}
@ -133,7 +134,7 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v3
env:
NAME: ${{env.NAME_PREFIX}}.gdextension
NAME: ${{env.NAME_PREFIX}}
with:
name: ${{ env.NAME }}
path: out/*