Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ on:
branches: [main]
paths:
- "CoderMind/**"
- ".github/workflows/rpgkit-*.yml"
- ".github/workflows/scripts/rpgkit/**"
- ".github/workflows/cmind-*.yml"
- ".github/workflows/scripts/cmind/**"
- ".markdownlint-cli2.jsonc"
pull_request:
paths:
- "CoderMind/**"
- ".github/workflows/rpgkit-*.yml"
- ".github/workflows/scripts/rpgkit/**"
- ".github/workflows/cmind-*.yml"
- ".github/workflows/scripts/cmind/**"
- ".markdownlint-cli2.jsonc"
workflow_dispatch:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
- dev
paths:
- "CoderMind/**"
- ".github/workflows/rpgkit-pre-release.yml"
- ".github/workflows/scripts/rpgkit/**"
- ".github/workflows/cmind-pre-release.yml"
- ".github/workflows/scripts/cmind/**"
workflow_dispatch:

jobs:
Expand All @@ -26,28 +26,28 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Prepare scripts
run: chmod +x .github/workflows/scripts/rpgkit/*.sh
run: chmod +x .github/workflows/scripts/cmind/*.sh

- name: Get CoderMind pre-release version
id: get_tag
run: .github/workflows/scripts/rpgkit/get-next-pre-version.sh "${{ github.run_number }}"
run: .github/workflows/scripts/cmind/get-next-pre-version.sh "${{ github.run_number }}"

- name: Check if release already exists
id: check_release
run: .github/workflows/scripts/rpgkit/check-release-exists.sh "${{ steps.get_tag.outputs.tag_name }}"
run: .github/workflows/scripts/cmind/check-release-exists.sh "${{ steps.get_tag.outputs.tag_name }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create release package variants
if: steps.check_release.outputs.exists == 'false'
run: .github/workflows/scripts/rpgkit/create-release-packages.sh "${{ steps.get_tag.outputs.new_version }}"
run: .github/workflows/scripts/cmind/create-release-packages.sh "${{ steps.get_tag.outputs.new_version }}"

- name: Generate release notes
if: steps.check_release.outputs.exists == 'false'
run: .github/workflows/scripts/rpgkit/generate-release-notes.sh "${{ steps.get_tag.outputs.new_version }}" "${{ steps.get_tag.outputs.latest_tag }}" pre
run: .github/workflows/scripts/cmind/generate-release-notes.sh "${{ steps.get_tag.outputs.new_version }}" "${{ steps.get_tag.outputs.latest_tag }}" pre

- name: Create GitHub pre-release
if: steps.check_release.outputs.exists == 'false'
run: .github/workflows/scripts/rpgkit/create-github-release.sh "${{ steps.get_tag.outputs.new_version }}" "${{ steps.get_tag.outputs.tag_name }}" pre
run: .github/workflows/scripts/cmind/create-github-release.sh "${{ steps.get_tag.outputs.new_version }}" "${{ steps.get_tag.outputs.tag_name }}" pre
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ on:
branches: [main]
paths:
- "CoderMind/**"
- ".github/workflows/rpgkit-release.yml"
- ".github/workflows/scripts/rpgkit/**"
- ".github/workflows/cmind-release.yml"
- ".github/workflows/scripts/cmind/**"
workflow_dispatch:

jobs:
Expand All @@ -25,32 +25,32 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Prepare scripts
run: chmod +x .github/workflows/scripts/rpgkit/*.sh
run: chmod +x .github/workflows/scripts/cmind/*.sh

- name: Get next CoderMind version
id: get_tag
run: .github/workflows/scripts/rpgkit/get-next-version.sh
run: .github/workflows/scripts/cmind/get-next-version.sh

- name: Check if release already exists
id: check_release
run: .github/workflows/scripts/rpgkit/check-release-exists.sh "${{ steps.get_tag.outputs.tag_name }}"
run: .github/workflows/scripts/cmind/check-release-exists.sh "${{ steps.get_tag.outputs.tag_name }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Update version in pyproject.toml
if: steps.check_release.outputs.exists == 'false'
run: .github/workflows/scripts/rpgkit/update-version.sh "${{ steps.get_tag.outputs.new_version }}"
run: .github/workflows/scripts/cmind/update-version.sh "${{ steps.get_tag.outputs.new_version }}"

- name: Create release package variants
if: steps.check_release.outputs.exists == 'false'
run: .github/workflows/scripts/rpgkit/create-release-packages.sh "${{ steps.get_tag.outputs.new_version }}"
run: .github/workflows/scripts/cmind/create-release-packages.sh "${{ steps.get_tag.outputs.new_version }}"

- name: Generate release notes
if: steps.check_release.outputs.exists == 'false'
run: .github/workflows/scripts/rpgkit/generate-release-notes.sh "${{ steps.get_tag.outputs.new_version }}" "${{ steps.get_tag.outputs.latest_tag }}" stable
run: .github/workflows/scripts/cmind/generate-release-notes.sh "${{ steps.get_tag.outputs.new_version }}" "${{ steps.get_tag.outputs.latest_tag }}" stable

- name: Create GitHub release
if: steps.check_release.outputs.exists == 'false'
run: .github/workflows/scripts/rpgkit/create-github-release.sh "${{ steps.get_tag.outputs.new_version }}" "${{ steps.get_tag.outputs.tag_name }}" stable
run: .github/workflows/scripts/cmind/create-github-release.sh "${{ steps.get_tag.outputs.new_version }}" "${{ steps.get_tag.outputs.tag_name }}" stable
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ TAG_NAME="$2"
RELEASE_KIND="${3:-stable}"
VERSION_NO_V="${VERSION#v}"
REPO_ROOT="${GITHUB_WORKSPACE:-$(git rev-parse --show-toplevel)}"
PROJECT_DIR="${PROJECT_DIR:-RPG-Kit}"
PROJECT_DIR="${PROJECT_DIR:-CoderMind}"
PROJECT_ROOT="$REPO_ROOT/$PROJECT_DIR"
GENRELEASES_DIR="$PROJECT_ROOT/.genreleases"
NOTES_FILE="${NOTES_FILE:-$REPO_ROOT/release_notes.md}"

mapfile -t ASSETS < <(find "$GENRELEASES_DIR" -maxdepth 1 -type f -name "rpgkit-template-*-${VERSION}.zip" | sort)
mapfile -t ASSETS < <(find "$GENRELEASES_DIR" -maxdepth 1 -type f -name "cmind-template-*-${VERSION}.zip" | sort)
if [[ ${#ASSETS[@]} -eq 0 ]]; then
echo "No release assets found in $GENRELEASES_DIR for $VERSION" >&2
exit 1
Expand All @@ -34,7 +34,7 @@ fi

gh release create "$TAG_NAME" \
"${ASSETS[@]}" \
--title "RPG-Kit Templates - $VERSION_NO_V" \
--title "CoderMind Templates - $VERSION_NO_V" \
--notes-file "$NOTES_FILE" \
"${PRERELEASE_ARG[@]}" \
"${TARGET_ARG[@]}"
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ if ($Version -notmatch '^v\d+\.\d+\.\d+(-.+)?$') {
}

$RepoRoot = if ($env:GITHUB_WORKSPACE) { $env:GITHUB_WORKSPACE } else { (git rev-parse --show-toplevel).Trim() }
$ProjectDir = if ($env:PROJECT_DIR) { $env:PROJECT_DIR } else { "RPG-Kit" }
$ProjectDir = if ($env:PROJECT_DIR) { $env:PROJECT_DIR } else { "CoderMind" }
$ProjectRoot = Join-Path $RepoRoot $ProjectDir
if (-not (Test-Path $ProjectRoot)) {
Write-Error "RPG-Kit project directory not found: $ProjectRoot"
Write-Error "CoderMind project directory not found: $ProjectRoot"
exit 1
}
Set-Location $ProjectRoot
Expand All @@ -68,10 +68,10 @@ New-Item -ItemType Directory -Path $GenReleasesDir -Force | Out-Null
function Rewrite-Paths {
param([string]$Content)

$Content = $Content -replace '(/?)\bmemory/', '.rpgkit/memory/'
$Content = $Content -replace '(/?)\bscripts/', '.rpgkit/scripts/'
$Content = $Content -replace '(/?)\btemplates/', '.rpgkit/templates/'
$Content = $Content -replace '(/?)\butils/', '.rpgkit/utils/'
$Content = $Content -replace '(/?)\bmemory/', '.cmind/memory/'
$Content = $Content -replace '(/?)\bscripts/', '.cmind/scripts/'
$Content = $Content -replace '(/?)\btemplates/', '.cmind/templates/'
$Content = $Content -replace '(/?)\butils/', '.cmind/utils/'
return $Content
}

Expand All @@ -97,11 +97,11 @@ function Generate-Commands {
$description = $matches[1]
}

# Rewrite paths for .rpgkit structure
# Rewrite paths for .cmind structure
$body = Rewrite-Paths -Content $body

# Generate output file based on extension
$outputFile = Join-Path $OutputDir "rpgkit.$name.$Extension"
$outputFile = Join-Path $OutputDir "cmind.$name.$Extension"

switch ($Extension) {
'toml' {
Expand All @@ -127,7 +127,7 @@ function Generate-CopilotPrompts {

New-Item -ItemType Directory -Path $PromptsDir -Force | Out-Null

$agentFiles = Get-ChildItem -Path "$AgentsDir/rpgkit.*.agent.md" -File -ErrorAction SilentlyContinue
$agentFiles = Get-ChildItem -Path "$AgentsDir/cmind.*.agent.md" -File -ErrorAction SilentlyContinue

foreach ($agentFile in $agentFiles) {
$basename = $agentFile.Name -replace '\.agent\.md$', ''
Expand All @@ -153,18 +153,18 @@ function Build-Variant {
New-Item -ItemType Directory -Path $baseDir -Force | Out-Null

# Copy base structure but filter scripts by variant
$specDir = Join-Path $baseDir ".rpgkit"
$specDir = Join-Path $baseDir ".cmind"
New-Item -ItemType Directory -Path $specDir -Force | Out-Null

if (Test-Path "pyproject.toml") {
Copy-Item -Path "pyproject.toml" -Destination (Join-Path $specDir "pyproject.toml") -Force
Write-Host "Copied pyproject.toml -> .rpgkit"
Write-Host "Copied pyproject.toml -> .cmind"
}

# Copy memory directory
if (Test-Path "memory") {
Copy-Item -Path "memory" -Destination $specDir -Recurse -Force
Write-Host "Copied memory -> .rpgkit"
Write-Host "Copied memory -> .cmind"
}

# Only copy the relevant script variant directory
Expand All @@ -176,13 +176,13 @@ function Build-Variant {
'sh' {
if (Test-Path "scripts/bash") {
Copy-Item -Path "scripts/bash" -Destination $scriptsDestDir -Recurse -Force
Write-Host "Copied scripts/bash -> .rpgkit/scripts"
Write-Host "Copied scripts/bash -> .cmind/scripts"
}
}
'ps' {
if (Test-Path "scripts/powershell") {
Copy-Item -Path "scripts/powershell" -Destination $scriptsDestDir -Recurse -Force
Write-Host "Copied scripts/powershell -> .rpgkit/scripts"
Write-Host "Copied scripts/powershell -> .cmind/scripts"
}
}
}
Expand Down Expand Up @@ -212,13 +212,13 @@ function Build-Variant {
New-Item -ItemType Directory -Path $destFileDir -Force | Out-Null
Copy-Item -Path $_.FullName -Destination $destFile -Force
}
Write-Host "Copied templates -> .rpgkit/templates"
Write-Host "Copied templates -> .cmind/templates"
}

# Copy utils directory
if (Test-Path "utils") {
Copy-Item -Path "utils" -Destination $specDir -Recurse -Force
Write-Host "Copied utils -> .rpgkit/utils"
Write-Host "Copied utils -> .cmind/utils"
}

# Replace <AI_CLI_CMD> placeholder in copied scripts with the actual CLI command name
Expand Down Expand Up @@ -342,7 +342,7 @@ function Build-Variant {
}

# Create zip archive
$zipFile = Join-Path $GenReleasesDir "rpgkit-template-${Agent}-${Script}-${Version}.zip"
$zipFile = Join-Path $GenReleasesDir "cmind-template-${Agent}-${Script}-${Version}.zip"
Compress-Archive -Path "$baseDir/*" -DestinationPath $zipFile -Force
Write-Host "Created $zipFile"
}
Expand Down Expand Up @@ -411,6 +411,6 @@ foreach ($agent in $AgentList) {
}

Write-Host "`nArchives in ${GenReleasesDir}:"
Get-ChildItem -Path $GenReleasesDir -Filter "rpgkit-template-*-${Version}.zip" | ForEach-Object {
Get-ChildItem -Path $GenReleasesDir -Filter "cmind-template-*-${Version}.zip" | ForEach-Object {
Write-Host " $($_.Name)"
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ if [[ ! $NEW_VERSION =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-.+)?$ ]]; then
fi

REPO_ROOT="${GITHUB_WORKSPACE:-$(git rev-parse --show-toplevel)}"
PROJECT_DIR="${PROJECT_DIR:-RPG-Kit}"
PROJECT_DIR="${PROJECT_DIR:-CoderMind}"
PROJECT_ROOT="$REPO_ROOT/$PROJECT_DIR"
GENRELEASES_DIR="$PROJECT_ROOT/.genreleases"

if [[ ! -d "$PROJECT_ROOT" ]]; then
echo "RPG-Kit project directory not found: $PROJECT_ROOT" >&2
echo "CoderMind project directory not found: $PROJECT_ROOT" >&2
exit 1
fi

Expand All @@ -57,11 +57,11 @@ generate_commands() {
case $ext in
toml)
body=$(sed 's/\\/\\\\/g' <<< "$body")
{ echo "description = \"$description\""; echo; echo "prompt = \"\"\""; echo "$body"; echo "\"\"\""; } > "$output_dir/rpgkit.$name.$ext" ;;
{ echo "description = \"$description\""; echo; echo "prompt = \"\"\""; echo "$body"; echo "\"\"\""; } > "$output_dir/cmind.$name.$ext" ;;
md)
echo "$body" > "$output_dir/rpgkit.$name.$ext" ;;
echo "$body" > "$output_dir/cmind.$name.$ext" ;;
agent.md)
echo "$body" > "$output_dir/rpgkit.$name.$ext" ;;
echo "$body" > "$output_dir/cmind.$name.$ext" ;;
esac
done
}
Expand All @@ -71,7 +71,7 @@ generate_copilot_prompts() {
mkdir -p "$prompts_dir"

# Generate a .prompt.md file for each .agent.md file
for agent_file in "$agents_dir"/rpgkit.*.agent.md; do
for agent_file in "$agents_dir"/cmind.*.agent.md; do
[[ -f "$agent_file" ]] || continue

local basename=$(basename "$agent_file" .agent.md)
Expand Down Expand Up @@ -109,27 +109,27 @@ build_variant() {
mkdir -p "$base_dir"

# Copy base structure but filter scripts by variant
SPEC_DIR="$base_dir/.rpgkit"
SPEC_DIR="$base_dir/.cmind"
mkdir -p "$SPEC_DIR"

# Create empty data directory for runtime output
mkdir -p "$SPEC_DIR/data"

[[ -f pyproject.toml ]] && { cp pyproject.toml "$SPEC_DIR/pyproject.toml"; echo "Copied pyproject.toml -> .rpgkit"; }
[[ -f pyproject.toml ]] && { cp pyproject.toml "$SPEC_DIR/pyproject.toml"; echo "Copied pyproject.toml -> .cmind"; }

[[ -d memory ]] && { cp -r memory "$SPEC_DIR/"; echo "Copied memory -> .rpgkit"; }
[[ -d memory ]] && { cp -r memory "$SPEC_DIR/"; echo "Copied memory -> .cmind"; }

# Only copy the relevant script variant directory
if [[ -d scripts ]]; then
mkdir -p "$SPEC_DIR/scripts"
case $script in
sh)
[[ -d scripts/bash ]] && { cp -r scripts/bash "$SPEC_DIR/scripts/"; echo "Copied scripts/bash -> .rpgkit/scripts"; }
[[ -d scripts/bash ]] && { cp -r scripts/bash "$SPEC_DIR/scripts/"; echo "Copied scripts/bash -> .cmind/scripts"; }
# Copy any script files that aren't in variant-specific directories
find scripts -maxdepth 1 -type f -exec cp {} "$SPEC_DIR/scripts/" \; 2>/dev/null || true
;;
ps)
[[ -d scripts/powershell ]] && { cp -r scripts/powershell "$SPEC_DIR/scripts/"; echo "Copied scripts/powershell -> .rpgkit/scripts"; }
[[ -d scripts/powershell ]] && { cp -r scripts/powershell "$SPEC_DIR/scripts/"; echo "Copied scripts/powershell -> .cmind/scripts"; }
# Copy any script files that aren't in variant-specific directories
find scripts -maxdepth 1 -type f -exec cp {} "$SPEC_DIR/scripts/" \; 2>/dev/null || true
;;
Expand Down Expand Up @@ -178,9 +178,9 @@ build_variant() {
fi
fi

[[ -d templates ]] && { mkdir -p "$SPEC_DIR/templates"; find templates -type f -not -path "templates/commands/*" -not -name "vscode-settings.json" -exec cp --parents {} "$SPEC_DIR"/ \; ; echo "Copied templates -> .rpgkit/templates"; }
[[ -d templates ]] && { mkdir -p "$SPEC_DIR/templates"; find templates -type f -not -path "templates/commands/*" -not -name "vscode-settings.json" -exec cp --parents {} "$SPEC_DIR"/ \; ; echo "Copied templates -> .cmind/templates"; }

[[ -d utils ]] && { cp -r utils "$SPEC_DIR/"; echo "Copied utils -> .rpgkit/utils"; }
[[ -d utils ]] && { cp -r utils "$SPEC_DIR/"; echo "Copied utils -> .cmind/utils"; }

case $agent in
claude)
Expand Down Expand Up @@ -245,8 +245,8 @@ SETTINGS
mkdir -p "$base_dir/.agents/commands"
generate_commands md "$base_dir/.agents/commands" ;;
esac
create_archive "$base_dir" "$GENRELEASES_DIR/rpgkit-template-${agent}-${script}-${NEW_VERSION}.zip"
echo "Created $GENRELEASES_DIR/rpgkit-template-${agent}-${script}-${NEW_VERSION}.zip"
create_archive "$base_dir" "$GENRELEASES_DIR/cmind-template-${agent}-${script}-${NEW_VERSION}.zip"
echo "Created $GENRELEASES_DIR/cmind-template-${agent}-${script}-${NEW_VERSION}.zip"
}

# Determine agent list
Expand Down Expand Up @@ -296,5 +296,5 @@ for agent in "${AGENT_LIST[@]}"; do
done

echo "Archives in $GENRELEASES_DIR:"
ls -1 "$GENRELEASES_DIR"/rpgkit-template-*-"${NEW_VERSION}".zip
ls -1 "$GENRELEASES_DIR"/cmind-template-*-"${NEW_VERSION}".zip

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ NEW_VERSION="$1"
LAST_TAG="$2"
RELEASE_KIND="${3:-stable}"
REPO_ROOT="${GITHUB_WORKSPACE:-$(git rev-parse --show-toplevel)}"
PROJECT_DIR="${PROJECT_DIR:-RPG-Kit}"
PROJECT_DIR="${PROJECT_DIR:-CoderMind}"
NOTES_FILE="${NOTES_FILE:-$REPO_ROOT/release_notes.md}"

if git rev-parse -q --verify "refs/tags/$LAST_TAG" >/dev/null; then
Expand All @@ -19,21 +19,21 @@ else
COMMITS=$(git log --oneline --pretty=format:"- %s" HEAD -- "$PROJECT_DIR" | head -n 10 || true)
fi

COMMITS="${COMMITS:-No RPG-Kit changes found.}"
COMMITS="${COMMITS:-No CoderMind changes found.}"

if [[ "$RELEASE_KIND" == "pre" ]]; then
BRANCH="${GITHUB_REF_NAME:-unknown}"
cat > "$NOTES_FILE" << EOF
> **This is a development pre-release from the \`$BRANCH\` branch.**
> It is intended for testing purposes only. For stable releases, use \`rpgkit init\` without \`--pre\`.
> It is intended for testing purposes only. For stable releases, use \`cmind init\` without \`--pre\`.

## Changelog (since ${LAST_TAG})

$COMMITS
EOF
else
cat > "$NOTES_FILE" << EOF
This is the latest RPG-Kit template release. We recommend using the RPG-Kit CLI to scaffold projects, but the template archives can also be downloaded and managed manually.
This is the latest CoderMind template release. We recommend using the CoderMind CLI to scaffold projects, but the template archives can also be downloaded and managed manually.

## Changelog (since ${LAST_TAG})

Expand Down
Loading
Loading