From 17291081e569c22a14bd268460a056042070ce22 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Thu, 15 Feb 2024 14:24:45 +0100 Subject: [PATCH 1/2] GHA: Package demo project --- .github/workflows/all_builds.yml | 7 ++++++ .github/workflows/demo.yml | 40 ++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 .github/workflows/demo.yml diff --git a/.github/workflows/all_builds.yml b/.github/workflows/all_builds.yml index f84d533..12a19a4 100644 --- a/.github/workflows/all_builds.yml +++ b/.github/workflows/all_builds.yml @@ -100,3 +100,10 @@ jobs: godot-cpp-treeish: ${{ inputs.godot-cpp-treeish }} limboai-treeish: ${{ needs.cache-sha.outputs.limboai-sha }} test-build: false + + demo: + name: 🎮️ Demo project + needs: cache-sha + uses: ./.github/workflows/demo.yml + with: + limboai-treeish: ${{ needs.cache-sha.outputs.limboai-sha }} diff --git a/.github/workflows/demo.yml b/.github/workflows/demo.yml new file mode 100644 index 0000000..47d66c9 --- /dev/null +++ b/.github/workflows/demo.yml @@ -0,0 +1,40 @@ +name: 🎮️ Demo project +on: + workflow_call: + inputs: + limboai-treeish: + description: A tag, branch or commit hash in the LimboAI repository. + type: string + default: master + + workflow_dispatch: + inputs: + limboai-treeish: + description: A tag, branch or commit hash in the LimboAI repository. + type: string + default: master + +jobs: + package-demo: + runs-on: ubuntu-latest + + steps: + - name: Clone LimboAI module + uses: actions/checkout@v4 + with: + fetch-tags: true + ref: ${{ inputs.limboai-treeish }} + + - name: Prepare artifact + shell: bash + run: | + echo "LIMBOAI_VERSION=$( (git describe --tags --exact-match HEAD || git rev-parse --short HEAD) | sed 's/\(.*\)-\(.*\)/\1.\2/g' )" >> "$GITHUB_ENV" + cp {README,LICENSE}.md demo/ + + - name: Upload artifact + uses: actions/upload-artifact@v3 + env: + NAME: limboai+${{env.LIMBOAI_VERSION}}.demo-project + with: + name: ${{ env.NAME }} + path: demo/* From 3c9fc333b0ca234bad11dd0c5412e50cfdc994f4 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Thu, 15 Feb 2024 14:34:05 +0100 Subject: [PATCH 2/2] GHA: Tweaks --- .github/actions/init-version-gdext/action.yml | 3 +-- .github/workflows/demo.yml | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/init-version-gdext/action.yml b/.github/actions/init-version-gdext/action.yml index a16fccf..efb5c98 100644 --- a/.github/actions/init-version-gdext/action.yml +++ b/.github/actions/init-version-gdext/action.yml @@ -20,5 +20,4 @@ runs: - name: Set NAME_PREFIX shell: bash - run: echo "NAME_PREFIX=gdextension-${GDEXTENSION_VERSION}.limboai+${LIMBOAI_VERSION}" >> "$GITHUB_ENV" - + run: echo "NAME_PREFIX=limboai+${LIMBOAI_VERSION}.gdextension-${GDEXTENSION_VERSION}" >> "$GITHUB_ENV" diff --git a/.github/workflows/demo.yml b/.github/workflows/demo.yml index 47d66c9..9aa6339 100644 --- a/.github/workflows/demo.yml +++ b/.github/workflows/demo.yml @@ -17,6 +17,7 @@ on: jobs: package-demo: runs-on: ubuntu-latest + name: Package demo steps: - name: Clone LimboAI module