Prompt file imported from Advance-Technologies-Foundation/creatioclient (
.github/prompts/release.prompt.md). Copyright stays with the author.
Release Management Prompt
"Create a new release by incrementing the build number from the latest tag"
instructions: |
You are a release automation assistant for the creatioclient project. When the user runs /release, follow these steps:
-
Check and setup GitHub CLI first:
# Check if gh CLI is installed if ! command -v gh >/dev/null 2>&1; then echo "GitHub CLI not found. Installing..." # Auto-detect OS and install fi # Verify authentication gh auth statusAuto-install GitHub CLI (if missing):
- macOS:
brew install gh - Windows:
winget install --id GitHub.cliorchoco install gh - Linux: Check https://github.com/cli/cli/blob/trunk/docs/install_linux.md
If installation fails: Provide manual link and continue with tag creation only
- macOS:
-
Get the latest release tag from the repository:
git describe --tags --abbrev=0 -
Parse and validate the current version - it should be in format X.Y.Z (e.g., 1.0.30):
- Remove 'v' prefix if present (v1.0.30 → 1.0.30)
- Validate format with regex: ^\d+.\d+.\d+$
- Increment the patch version (last digit): 1.0.30 → 1.0.31
-
Update project version in creatioclient/creatioclient.csproj:
- Update AssemblyVersion element to match the new version
- This ensures the compiled assembly shows the correct version
-
Create and push the new tag:
git tag [NEW_VERSION] git push origin [NEW_VERSION] -
Create GitHub release (should work now since we checked CLI in step 1):
gh release create [NEW_VERSION] --title "Release [NEW_VERSION]" --notes "Automated release [NEW_VERSION]" -
CI/CD Automation: Once the GitHub release is created, the CI/CD workflow will automatically:
- Extract version from the release tag
- Build creatioclient with the extracted version (overriding project file version)
- Run unit tests with the release version
- Pack and publish NuGet package with the release version
- This ensures both the compiled assembly and NuGet package have the same version from the tag
-
Provide confirmation and next steps
Example workflow:
# Step 1: Setup GitHub CLI
if ! command -v gh >/dev/null 2>&1; then
echo "Installing GitHub CLI..."
# macOS: brew install gh
# Windows: winget install --id GitHub.cli
fi
gh auth status
# Step 2-4: Version management
Current tag: 1.0.30
Next version: 1.0.31
# Step 5-7: Update and create release
Commands:
# Update creatioclient/creatioclient.csproj version
sed -i 's|<AssemblyVersion[^>]*>[^<]*</AssemblyVersion>|<AssemblyVersion Condition="'\''$(AssemblyVersion)'\'' == '\'''\''">1.0.31</AssemblyVersion>|g' creatioclient/creatioclient.csproj
git tag 1.0.31
git push origin 1.0.31
gh release create 1.0.31 --title "Release 1.0.31" --notes "Automated release 1.0.31"
Error handling:
- Step 1: If GitHub CLI installation fails, note this but continue with tag creation
- If no tags exist, start with 1.0.1
- If tag format is invalid, report error with expected format
- If git operations fail, provide helpful error messages
- If GitHub CLI is available but not authenticated, prompt for
gh auth login - If GitHub CLI unavailable after installation attempt, provide manual release creation link
- Always confirm before creating tags and releases
Implementation notes:
- Always start with GitHub CLI check and installation - this is the most important step
- Detect OS (macOS/Windows/Linux) and provide appropriate installation command
- Check authentication status:
gh auth statusafter installation - Version format can be X.Y.Z (simple semantic versioning)
- Handle authentication gracefully with helpful error messages
- Even if CLI setup fails, continue with tag creation and provide manual release link
- Monitor progress at: https://github.com/Advance-Technologies-Foundation/creatioclient/actions
