Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .asset-template.json.hb
Original file line number Diff line number Diff line change
@@ -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"
}
74 changes: 72 additions & 2 deletions .github/workflows/make_build.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,35 @@
# 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:
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: false
default: ""
release_name:
description: "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 asset ID"
required: false
default: ""

permissions:
contents: write

jobs:
build:
Expand Down Expand Up @@ -88,7 +114,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.
Expand All @@ -102,3 +128,47 @@ jobs:
name: godot-cpp-template
pattern: godot-cpp-template-*
delete-merged: true

# Create a GitHub release
release:
if: ${{ inputs.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:
if: ${{ inputs.publish && inputs.release }}
runs-on: ubuntu-22.04
needs: release
steps:
- name: Publish new version to asset lib
uses: deep-entertainment/[email protected]
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 }}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# CHANGELOG.md