From dafd18743f5033ab98a3f22c1dbd7560b40767ff Mon Sep 17 00:00:00 2001 From: "antoine.charruel" Date: Sun, 4 Jan 2026 22:28:46 +0100 Subject: [PATCH 1/5] automate GitHub releases and Godot Asset Lib publishing --- .github/workflows/make_build.yml | 62 ++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/.github/workflows/make_build.yml b/.github/workflows/make_build.yml index 9e91738a..a33c66bc 100644 --- a/.github/workflows/make_build.yml +++ b/.github/workflows/make_build.yml @@ -1,9 +1,25 @@ # For syntax, see https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax # This workflow is triggered manually on the "Actions" tab on GitHub, and can be used to create releases. -name: Make a GDExtension build for all supported platforms +name: Make and publish a GDExtension build for all supported platforms on: workflow_dispatch: + inputs: + tag_name: + description: "tag_name" + required: true + default: "tag_name" + release_name: + description: "release_name" + required: true + default: "release_name" + asset_id: + description: "The id of the asset in the asset store." + required: true + default: "asset_id" + +permissions: + contents: write jobs: build: @@ -88,7 +104,7 @@ jobs: with: name: godot-cpp-template-${{ matrix.target.platform }}-${{ matrix.target.arch }}-${{ matrix.float-precision }}-${{ matrix.target-type }} path: | - ${{ github.workspace }}/bin/** + ${{ github.workspace }}/demo/bin/** # Merges all the build artifacts together into a single godot-cpp-template artifact. # If you comment out this step, all the builds will be uploaded individually. @@ -102,3 +118,45 @@ jobs: name: godot-cpp-template pattern: godot-cpp-template-* delete-merged: true + + # Create a GitHub release + release: + runs-on: ubuntu-22.04 + needs: merge + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Download merged artifact + uses: actions/download-artifact@v4 + with: + name: godot-cpp-template + path: release/addons/godot-cpp-template/ + + - name: Create archive + shell: bash + run: | + sudo apt-get update && sudo apt-get install -y zip + cd release && zip -r ../godot-cpp-template.zip . + + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + tag_name: ${{ github.event.inputs.tag_name }} + name: ${{ github.event.inputs.release_name }} + body_path: CHANGELOG.md + make_latest: true + files: godot-cpp-template.zip + + publish: + runs-on: ubuntu-22.04 + needs: release + steps: + - name: Publish new version to asset lib + uses: deep-entertainment/godot-asset-lib-action@v0.4.0 + with: + # https://docs.github.com/actions/how-tos/write-workflows/choose-what-workflows-do/use-secrets + username: ${{ secrets.ASSET_STORE_USERNAME }} + password: ${{ secrets.ASSET_STORE_PASSWORD }} + assetId: ${{ github.event.inputs.asset_id }} \ No newline at end of file From bc0baae4e3d353c773b38944b370057cb31e6ea8 Mon Sep 17 00:00:00 2001 From: "antoine.charruel" Date: Sun, 4 Jan 2026 22:29:32 +0100 Subject: [PATCH 2/5] add asset library template --- .asset-template.json.hb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .asset-template.json.hb diff --git a/.asset-template.json.hb b/.asset-template.json.hb new file mode 100644 index 00000000..74609543 --- /dev/null +++ b/.asset-template.json.hb @@ -0,0 +1,14 @@ +{ + "title": "godot-cpp-template", + "category": "2D Tools", + "category_id": "1", + "godot_version": "4.1", + "version_string": "{{ context.inputs.tag_name }}", + "cost": "MIT", + "download_provider": "Custom", + "download_commit": "https://github.com/godotengine/godot-cpp-template/releases/download/{{ context.inputs.tag_name }}/godot-cpp-template.zip", + "browse_url": "{{ context.repository.html_url }}", + "issues_url": "{{ context.repository.html_url }}/issues", + "download_url": "https://github.com/godotengine/godot-cpp-template/releases/download/{{ context.inputs.tag_name }}/godot-cpp-template.zip", + "icon_url": "https://raw.githubusercontent.com/godotengine/godot-cpp-template/main/example.png" +} \ No newline at end of file From 887fce8af86aabacd44a4f7cd3a33786acaae04b Mon Sep 17 00:00:00 2001 From: "antoine.charruel" Date: Sun, 4 Jan 2026 22:37:16 +0100 Subject: [PATCH 3/5] add CHANGELOG.md file --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..39a5c904 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1 @@ +# CHANGELOG.md \ No newline at end of file From 5f994b7e136945f1a81c132db0a1a7b6500977d5 Mon Sep 17 00:00:00 2001 From: "antoine.charruel" Date: Mon, 5 Jan 2026 20:28:58 +0100 Subject: [PATCH 4/5] make release and asset library publishing optional --- .github/workflows/make_build.yml | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/.github/workflows/make_build.yml b/.github/workflows/make_build.yml index a33c66bc..2aba6d83 100644 --- a/.github/workflows/make_build.yml +++ b/.github/workflows/make_build.yml @@ -5,18 +5,28 @@ name: Make and publish a GDExtension build for all supported platforms on: workflow_dispatch: inputs: + release: + description: "Create a new GitHub release (Required to publish on Asset Lib)" + type: boolean + required: false + default: false tag_name: description: "tag_name" - required: true - default: "tag_name" + required: false + default: "" release_name: description: "release_name" - required: true - default: "release_name" + required: false + default: "" + publish: + description: "Publish new version to asset lib (Requires ASSET_STORE_USERNAME and ASSET_STORE_PASSWORD secrets, and .asset-template.json.hb to be edited)." + type: boolean + required: false + default: false asset_id: - description: "The id of the asset in the asset store." - required: true - default: "asset_id" + description: "The asset ID." + required: false + default: "" permissions: contents: write @@ -121,6 +131,7 @@ jobs: # Create a GitHub release release: + if: ${{ inputs.release}} runs-on: ubuntu-22.04 needs: merge steps: @@ -150,6 +161,7 @@ jobs: files: godot-cpp-template.zip publish: + if: ${{ inputs.publish && inputs.release }} runs-on: ubuntu-22.04 needs: release steps: From 8be3ff3bad45e2ce861053c6d79d4901580fa076 Mon Sep 17 00:00:00 2001 From: "antoine.charruel" Date: Mon, 5 Jan 2026 21:01:07 +0100 Subject: [PATCH 5/5] update workflow input descriptions --- .github/workflows/make_build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/make_build.yml b/.github/workflows/make_build.yml index 2aba6d83..765ec4fb 100644 --- a/.github/workflows/make_build.yml +++ b/.github/workflows/make_build.yml @@ -6,16 +6,16 @@ on: workflow_dispatch: inputs: release: - description: "Create a new GitHub release (Required to publish on Asset Lib)" + description: "Create a new GitHub release (Required to publish on Asset Lib)." type: boolean required: false default: false tag_name: - description: "tag_name" + description: "Tag name" required: false default: "" release_name: - description: "release_name" + description: "Release name" required: false default: "" publish: @@ -24,7 +24,7 @@ on: required: false default: false asset_id: - description: "The asset ID." + description: "The asset ID" required: false default: ""