From b9066e609acb1c30349a9a308959021d6ca56b7d Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Tue, 1 Aug 2023 18:06:19 +0200 Subject: [PATCH] GH: Implement version-based artifact naming --- .github/workflows/android.yml | 21 ++++++++++++--------- .github/workflows/ios.yml | 19 +++++++++++-------- .github/workflows/linux.yml | 25 ++++++++++++++++--------- .github/workflows/macos.yml | 21 ++++++++++++--------- .github/workflows/runner.yml | 28 ++++++++++++++-------------- .github/workflows/web.yml | 15 ++++++++------- .github/workflows/windows.yml | 18 ++++++++++-------- 7 files changed, 83 insertions(+), 64 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index d5f90cd..ac657dd 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -2,22 +2,22 @@ name: 🤖 Android builds on: workflow_call: inputs: - godot_treeish: + godot-treeish: description: A tag, branch or commit hash in the Godot repository. type: string default: master - limboai_treeish: + limboai-treeish: description: A tag, branch or commit hash in the LimboAI repository. type: string default: master workflow_dispatch: inputs: - godot_treeish: + godot-treeish: description: A tag, branch or commit hash in the Godot repository. type: string default: master - limboai_treeish: + limboai-treeish: description: A tag, branch or commit hash in the LimboAI repository. type: string default: master @@ -77,13 +77,13 @@ jobs: uses: actions/checkout@v3 with: repository: godotengine/godot - ref: ${{ inputs.godot_treeish }} + ref: ${{ inputs.godot-treeish }} - name: Clone LimboAI module uses: actions/checkout@v3 with: path: modules/limboai - ref: ${{ inputs.limboai_treeish }} + ref: ${{ inputs.limboai-treeish }} - name: Set up Java 11 uses: actions/setup-java@v3 @@ -127,12 +127,15 @@ jobs: name: Make Android package needs: android-builds + env: + NAME_PREFIX: godot.${{inputs.godot-treeish}}.limboai+${{inputs.limboai-treeish}} + steps: - name: Clone Godot uses: actions/checkout@v3 with: repository: godotengine/godot - ref: ${{ inputs.godot_treeish }} + ref: ${{ inputs.godot-treeish }} - name: Download Android template builds uses: actions/download-artifact@v3 @@ -179,11 +182,11 @@ jobs: - name: Upload Android libs uses: actions/upload-artifact@v3 with: - name: godot.limboai.android-lib + name: ${{env.NAME_PREFIX}}.android-lib path: bin/godot-lib.* - name: Upload Android templates uses: actions/upload-artifact@v3 with: - name: godot.limboai.export-templates + name: ${{env.NAME_PREFIX}}.export-templates path: out/* diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index a8db307..da6e3af 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -2,22 +2,22 @@ name: 🍏 iOS builds on: workflow_call: inputs: - godot_treeish: + godot-treeish: description: A tag, branch or commit hash in the Godot repository. type: string default: master - limboai_treeish: + limboai-treeish: description: A tag, branch or commit hash in the LimboAI repository. type: string default: master workflow_dispatch: inputs: - godot_treeish: + godot-treeish: description: A tag, branch or commit hash in the Godot repository. type: string default: master - limboai_treeish: + limboai-treeish: description: A tag, branch or commit hash in the LimboAI repository. type: string default: master @@ -79,13 +79,13 @@ jobs: uses: actions/checkout@v3 with: repository: godotengine/godot - ref: ${{ inputs.godot_treeish }} + ref: ${{ inputs.godot-treeish }} - name: Clone LimboAI module uses: actions/checkout@v3 with: path: modules/limboai - ref: ${{ inputs.limboai_treeish }} + ref: ${{ inputs.limboai-treeish }} - name: Set up Python 3.x uses: actions/setup-python@v4 @@ -135,13 +135,16 @@ jobs: name: Package iOS templates needs: ios-builds + env: + NAME_PREFIX: godot.${{inputs.godot-treeish}}.limboai+${{inputs.limboai-treeish}} + steps: - name: Clone Godot uses: actions/checkout@v3 with: repository: godotengine/godot - ref: ${{ inputs.godot_treeish }} + ref: ${{ inputs.godot-treeish }} - name: Set up Vulkan SDK run: | @@ -179,7 +182,7 @@ jobs: - name: Upload template bundle uses: actions/upload-artifact@v3 with: - name: godot.limboai.export-templates + name: ${{env.NAME_PREFIX}}.export-templates path: out/* - name: Delete templates artifact diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 54b7424..46d58c3 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -2,27 +2,26 @@ name: 🐧 Linux builds on: workflow_call: inputs: - godot_treeish: + godot-treeish: description: A tag, branch or commit hash in the Godot repository. type: string default: master - limboai_treeish: + limboai-treeish: description: A tag, branch or commit hash in the LimboAI repository. type: string default: master workflow_dispatch: inputs: - godot_treeish: + godot-treeish: description: A tag, branch or commit hash in the Godot repository. type: string default: master - limboai_treeish: + limboai-treeish: description: A tag, branch or commit hash in the LimboAI repository. type: string default: master - # Global Settings env: SCONS_CACHE_LIMIT: 4096 @@ -102,17 +101,23 @@ jobs: BIN: godot.linuxbsd.${{matrix.target}}.${{matrix.arch}}${{ matrix.build-mono == true && '.mono' || '' }} steps: + - name: Dump environment + env: + ENVI: ${{ toJson(env) }} + run: | + echo "$ENVI" + - name: Clone Godot uses: actions/checkout@v3 with: repository: godotengine/godot - ref: ${{ inputs.godot_treeish }} + ref: ${{ inputs.godot-treeish }} - name: Clone LimboAI module uses: actions/checkout@v3 with: path: modules/limboai - ref: ${{ inputs.limboai_treeish }} + ref: ${{ inputs.limboai-treeish }} # About sed see: https://github.com/godotengine/buildroot/issues/6 - name: Set up buildroot x86_64 @@ -175,7 +180,9 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v3 env: - BUILD_NAME: godot.limboai.${{matrix.target}}.linux.${{matrix.arch}}${{ matrix.build-mono == true && '.mono' || '' }} + NAME_PREFIX: godot.${{inputs.godot-treeish}}.limboai+${{inputs.limboai-treeish}} + NAME_EDITOR: ${{env.NAME_PREFIX}}.${{matrix.target}}.linux.${{matrix.arch}}${{ matrix.build-mono == true && '.mono' || '' }} + NAME_TEMPLATES: ${{env.NAME_PREFIX}}.export-templates with: - name: ${{ startsWith(matrix.target, 'template') && 'godot.limboai.export_templates' || env.BUILD_NAME }} + name: ${{ startsWith(matrix.target, 'template') && env.NAME_TEMPLATES || env.NAME_EDITOR }} path: out/* diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 6efa485..fc530d5 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -2,22 +2,22 @@ name: 🍎 macOS builds on: workflow_call: inputs: - godot_treeish: + godot-treeish: description: A tag, branch or commit hash in the Godot repository. type: string default: master - limboai_treeish: + limboai-treeish: description: A tag, branch or commit hash in the LimboAI repository. type: string default: master workflow_dispatch: inputs: - godot_treeish: + godot-treeish: description: A tag, branch or commit hash in the Godot repository. type: string default: master - limboai_treeish: + limboai-treeish: description: A tag, branch or commit hash in the LimboAI repository. type: string default: master @@ -125,13 +125,13 @@ jobs: uses: actions/checkout@v3 with: repository: godotengine/godot - ref: ${{ inputs.godot_treeish }} + ref: ${{ inputs.godot-treeish }} - name: Clone LimboAI module uses: actions/checkout@v3 with: path: modules/limboai - ref: ${{ inputs.limboai_treeish }} + ref: ${{ inputs.limboai-treeish }} - name: Set up Python 3.x uses: actions/setup-python@v4 @@ -198,13 +198,16 @@ jobs: name: Make macOS Bundles needs: macos-builds + env: + NAME_PREFIX: godot.${{inputs.godot-treeish}}.limboai+${{inputs.limboai-treeish}} + steps: - name: Clone Godot uses: actions/checkout@v3 with: repository: godotengine/godot - ref: ${{ inputs.godot_treeish }} + ref: ${{ inputs.godot-treeish }} - name: Download editor artifact uses: actions/download-artifact@v3 @@ -228,7 +231,7 @@ jobs: - name: Upload editor bundle uses: actions/upload-artifact@v3 with: - name: godot.limboai.editor.macos.universal + name: ${{env.NAME_PREFIX}}.editor.macos.universal path: out/editor/* - name: Download templates artifact @@ -265,5 +268,5 @@ jobs: - name: Upload templates bundle uses: actions/upload-artifact@v3 with: - name: godot.limboai.export-templates + name: ${{env.NAME_PREFIX}}.export-templates path: out/* diff --git a/.github/workflows/runner.yml b/.github/workflows/runner.yml index 217a3cd..71245f0 100644 --- a/.github/workflows/runner.yml +++ b/.github/workflows/runner.yml @@ -2,11 +2,11 @@ name: 🔗 All Builds on: workflow_dispatch: inputs: - godot_treeish: + godot-treeish: description: A tag, branch or commit hash in the Godot repository. type: string default: master - limboai_treeish: + limboai-treeish: description: A tag, branch or commit hash in the LimboAI repository. type: string default: master @@ -16,40 +16,40 @@ jobs: name: 🤖 Android uses: ./.github/workflows/android.yml with: - godot_treeish: ${{ inputs.godot_treeish }} - limboai_treeish: ${{ inputs.limboai_treeish }} + godot-treeish: ${{ inputs.godot-treeish }} + limboai-treeish: ${{ inputs.limboai-treeish }} ios-build: name: 🍏 iOS uses: ./.github/workflows/ios.yml with: - godot_treeish: ${{ inputs.godot_treeish }} - limboai_treeish: ${{ inputs.limboai_treeish }} + godot-treeish: ${{ inputs.godot-treeish }} + limboai-treeish: ${{ inputs.limboai-treeish }} linux-build: name: 🐧 Linux uses: ./.github/workflows/linux.yml with: - godot_treeish: ${{ inputs.godot_treeish }} - limboai_treeish: ${{ inputs.limboai_treeish }} + godot-treeish: ${{ inputs.godot-treeish }} + limboai-treeish: ${{ inputs.limboai-treeish }} macos-build: name: 🍎 macOS uses: ./.github/workflows/macos.yml with: - godot_treeish: ${{ inputs.godot_treeish }} - limboai_treeish: ${{ inputs.limboai_treeish }} + godot-treeish: ${{ inputs.godot-treeish }} + limboai-treeish: ${{ inputs.limboai-treeish }} windows-build: name: 🪟 Windows uses: ./.github/workflows/windows.yml with: - godot_treeish: ${{ inputs.godot_treeish }} - limboai_treeish: ${{ inputs.limboai_treeish }} + godot-treeish: ${{ inputs.godot-treeish }} + limboai-treeish: ${{ inputs.limboai-treeish }} web-build: name: 🌐 Web uses: ./.github/workflows/web.yml with: - godot_treeish: ${{ inputs.godot_treeish }} - limboai_treeish: ${{ inputs.limboai_treeish }} + godot-treeish: ${{ inputs.godot-treeish }} + limboai-treeish: ${{ inputs.limboai-treeish }} diff --git a/.github/workflows/web.yml b/.github/workflows/web.yml index e10e961..b2a828b 100644 --- a/.github/workflows/web.yml +++ b/.github/workflows/web.yml @@ -2,22 +2,22 @@ name: 🌐 Web builds on: workflow_call: inputs: - godot_treeish: + godot-treeish: description: A tag, branch or commit hash in the Godot repository. type: string default: master - limboai_treeish: + limboai-treeish: description: A tag, branch or commit hash in the LimboAI repository. type: string default: master workflow_dispatch: inputs: - godot_treeish: + godot-treeish: description: A tag, branch or commit hash in the Godot repository. type: string default: master - limboai_treeish: + limboai-treeish: description: A tag, branch or commit hash in the LimboAI repository. type: string default: master @@ -56,19 +56,20 @@ jobs: env: CACHE_NAME: godot.web.${{matrix.target}}${{ matrix.dlink_enabled == true && '.dlink' || '' }} + NAME_PREFIX: godot.${{inputs.godot-treeish}}.limboai+${{inputs.limboai-treeish}} steps: - name: Clone Godot uses: actions/checkout@v3 with: repository: godotengine/godot - ref: ${{ inputs.godot_treeish }} + ref: ${{ inputs.godot-treeish }} - name: Clone LimboAI module uses: actions/checkout@v3 with: path: modules/limboai - ref: ${{ inputs.limboai_treeish }} + ref: ${{ inputs.limboai-treeish }} - name: Set up Emscripten latest uses: mymindstorm/setup-emsdk@v12 @@ -115,5 +116,5 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v3 with: - name: godot.limboai.export-templates + name: ${{env.NAME_PREFIX}}.export-templates path: out/* diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index d38e4ca..6dd12f9 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -2,22 +2,22 @@ name: 🪟 Windows builds on: workflow_call: inputs: - godot_treeish: + godot-treeish: description: A tag, branch or commit hash in the Godot repository. type: string default: master - limboai_treeish: + limboai-treeish: description: A tag, branch or commit hash in the LimboAI repository. type: string default: master workflow_dispatch: inputs: - godot_treeish: + godot-treeish: description: A tag, branch or commit hash in the Godot repository. type: string default: master - limboai_treeish: + limboai-treeish: description: A tag, branch or commit hash in the LimboAI repository. type: string default: master @@ -106,13 +106,13 @@ jobs: uses: actions/checkout@v3 with: repository: godotengine/godot - ref: ${{ inputs.godot_treeish }} + ref: ${{ inputs.godot-treeish }} - name: Clone LimboAI module uses: actions/checkout@v3 with: path: modules/limboai - ref: ${{ inputs.limboai_treeish }} + ref: ${{ inputs.limboai-treeish }} - name: Set up Python 3.x uses: actions/setup-python@v4 @@ -166,7 +166,9 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v3 env: - BUILD_NAME: godot.limboai.${{matrix.target}}.windows.${{matrix.arch}}${{ matrix.build-mono == true && '.mono' || '' }} + NAME_PREFIX: godot.${{inputs.godot-treeish}}.limboai+${{inputs.limboai-treeish}} + NAME_EDITOR: ${{env.NAME_PREFIX}}.${{matrix.target}}.windows.${{matrix.arch}}${{ matrix.build-mono == true && '.mono' || '' }} + NAME_TEMPLATES: ${{env.NAME_PREFIX}}.export-templates with: - name: ${{ startsWith(matrix.target, 'template') && 'godot.limboai.export_templates' || env.BUILD_NAME }} + name: ${{ startsWith(matrix.target, 'template') && env.NAME_TEMPLATES || env.NAME_EDITOR }} path: out/*