Skip to content

FEATURE: Standardize BOOST name and enhance release strategy #2

FEATURE: Standardize BOOST name and enhance release strategy

FEATURE: Standardize BOOST name and enhance release strategy #2

Workflow file for this run

name: 🏷️ Version Management
on:
push:
tags:
- 'v*.*.*' # All version tags - informational analysis only (release.yml now handles all versions)
# Manual trigger for version planning
workflow_dispatch:
inputs:
next-version:
description: 'Next planned version (e.g., v2.1.0)'
required: true
type: string
version-type:
description: 'Type of version increment'
required: true
type: choice
options:
- minor
- patch
- major
jobs:
analyze-version:
name: 📋 Analyze Version Tag
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Analyze version tag
run: |
VERSION="${{ github.ref_name }}"
echo "🏷️ Version tag pushed: $VERSION"
# Parse version components
VERSION_CLEAN=$(echo "$VERSION" | sed 's/^v//')
MAJOR=$(echo "$VERSION_CLEAN" | cut -d. -f1)
MINOR=$(echo "$VERSION_CLEAN" | cut -d. -f2)
PATCH=$(echo "$VERSION_CLEAN" | cut -d. -f3)
echo "📊 Version components:"
echo " - Major: $MAJOR"
echo " - Minor: $MINOR"
echo " - Patch: $PATCH"
# Determine version type
if [ "$MINOR" = "0" ] && [ "$PATCH" = "0" ]; then
VERSION_TYPE="major"
echo "🎉 This is a MAJOR version - Release workflow will trigger automatically"
elif [ "$PATCH" = "0" ]; then
VERSION_TYPE="minor"
echo "🔄 This is a MINOR version - Release workflow will trigger automatically"
else
VERSION_TYPE="patch"
echo "🩹 This is a PATCH version - Release workflow will trigger automatically"
fi
# Add to step summary
cat >> $GITHUB_STEP_SUMMARY << EOF
# 🏷️ Version Analysis: $VERSION
## Version Type: **${VERSION_TYPE^^}**
| Component | Value |
|-----------|-------|
| Major | $MAJOR |
| Minor | $MINOR |
| Patch | $PATCH |
## Automated Actions
EOF
cat >> $GITHUB_STEP_SUMMARY << EOF
✅ **Release workflow will trigger automatically for all versions**
- Complete documentation build with PDF generation
- GitHub release creation with artifacts
- Release type: **${VERSION_TYPE^} Release**
- Automatic package creation and distribution
## What's Happening
1. **Documentation Build**: Full HTML and PDF generation
2. **Schema Validation**: All 33+ entity schemas validated
3. **GitHub Release**: Created with downloadable packages
4. **Artifact Upload**: ZIP and TAR.GZ packages available
EOF
plan-next-version:
name: 📈 Plan Next Version
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch'
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Analyze version plan
run: |
NEXT_VERSION="${{ github.event.inputs.next-version }}"
VERSION_TYPE="${{ github.event.inputs.version-type }}"
echo "📈 Planning next version: $NEXT_VERSION ($VERSION_TYPE)"
# Get current latest tag
CURRENT_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0")
echo "📋 Current latest tag: $CURRENT_TAG"
# Validate version format
if ! echo "$NEXT_VERSION" | grep -qE "^v[0-9]+\.[0-9]+\.[0-9]+$"; then
echo "❌ Invalid version format: $NEXT_VERSION"
echo "Expected format: v1.2.3"
exit 1
fi
# Parse versions
CURRENT_CLEAN=$(echo "$CURRENT_TAG" | sed 's/^v//')
NEXT_CLEAN=$(echo "$NEXT_VERSION" | sed 's/^v//')
CURRENT_MAJOR=$(echo "$CURRENT_CLEAN" | cut -d. -f1)
CURRENT_MINOR=$(echo "$CURRENT_CLEAN" | cut -d. -f2)
CURRENT_PATCH=$(echo "$CURRENT_CLEAN" | cut -d. -f3)
NEXT_MAJOR=$(echo "$NEXT_CLEAN" | cut -d. -f1)
NEXT_MINOR=$(echo "$NEXT_CLEAN" | cut -d. -f2)
NEXT_PATCH=$(echo "$NEXT_CLEAN" | cut -d. -f3)
# Validate increment type
ACTUAL_TYPE=""
if [ "$NEXT_MAJOR" -gt "$CURRENT_MAJOR" ]; then
ACTUAL_TYPE="major"
elif [ "$NEXT_MINOR" -gt "$CURRENT_MINOR" ] && [ "$NEXT_MAJOR" -eq "$CURRENT_MAJOR" ]; then
ACTUAL_TYPE="minor"
elif [ "$NEXT_PATCH" -gt "$CURRENT_PATCH" ] && [ "$NEXT_MINOR" -eq "$CURRENT_MINOR" ] && [ "$NEXT_MAJOR" -eq "$CURRENT_MAJOR" ]; then
ACTUAL_TYPE="patch"
else
echo "❌ Invalid version increment"
echo "Current: $CURRENT_TAG → Next: $NEXT_VERSION"
exit 1
fi
if [ "$ACTUAL_TYPE" != "$VERSION_TYPE" ]; then
echo "⚠️ Version type mismatch:"
echo " - Specified: $VERSION_TYPE"
echo " - Actual: $ACTUAL_TYPE"
echo " - Continuing with actual type: $ACTUAL_TYPE"
fi
# Generate version plan summary
cat >> $GITHUB_STEP_SUMMARY << EOF
# 📈 Version Plan: $NEXT_VERSION
## Current → Next
| | Current | Next | Change |
|---|---------|------|--------|
| **Version** | $CURRENT_TAG | $NEXT_VERSION | +$(echo "$NEXT_CLEAN - $CURRENT_CLEAN" | bc 2>/dev/null || echo "N/A") |
| **Major** | $CURRENT_MAJOR | $NEXT_MAJOR | $([ "$NEXT_MAJOR" -gt "$CURRENT_MAJOR" ] && echo "🎉 +$((NEXT_MAJOR - CURRENT_MAJOR))" || echo "→") |
| **Minor** | $CURRENT_MINOR | $NEXT_MINOR | $([ "$NEXT_MINOR" -gt "$CURRENT_MINOR" ] && echo "🔄 +$((NEXT_MINOR - CURRENT_MINOR))" || echo "→") |
| **Patch** | $CURRENT_PATCH | $NEXT_PATCH | $([ "$NEXT_PATCH" -gt "$CURRENT_PATCH" ] && echo "🩹 +$((NEXT_PATCH - CURRENT_PATCH))" || echo "→") |
## Version Type: **${ACTUAL_TYPE^^}**
EOF
cat >> $GITHUB_STEP_SUMMARY << EOF
## 🚀 ${ACTUAL_TYPE^} Version Release Plan
**Automatic Release:** ✅ Yes (when tag is pushed)
**What happens when you create tag \`$NEXT_VERSION\`:**
1. Release workflow triggers automatically
2. Complete documentation build with PDF
3. GitHub release created with artifacts
4. $([ "$ACTUAL_TYPE" = "major" ] && echo "Breaking changes warning included" || echo "Backward compatible release")
**To create this release:**
\`\`\`bash
git tag $NEXT_VERSION
git push origin $NEXT_VERSION
\`\`\`
**Release Features:**
- 📚 Full documentation package (HTML + PDF)
- 🔍 Interactive ERD Navigator included
- 📋 All JSON Schema files validated and packaged
- 🚀 Automatic GitHub release with downloadable artifacts
EOF
notify-version-policy:
name: 📢 Version Policy Reminder
runs-on: ubuntu-latest
if: github.event_name == 'push' && !startsWith(github.ref_name, 'v')
steps:
- name: Version policy reminder
run: |
cat >> $GITHUB_STEP_SUMMARY << EOF
# 📢 BOOST Version Release Policy
## Current Policy: All Versions Released
**Automatic Releases:** ✅ All semantic version tags (v1.0.0, v1.2.3, v2.1.0, etc.)
## How to Create a Release
**To create any version release:**
\`\`\`bash
git tag v2.1.0 # Your desired version
git push origin v2.1.0
\`\`\`
This will automatically:
1. 🏗️ Build complete documentation (HTML + PDF)
2. ✅ Validate all 33+ schema files
3. 📦 Create downloadable release packages
4. 🚀 Publish GitHub release with artifacts
## When to Use Each Version Type
- **Major (x.0.0)**: Breaking changes, major new features
- **Minor (x.y.0)**: New features, backwards compatible
- **Patch (x.y.z)**: Bug fixes, small improvements
All version types now receive full release packages automatically!
EOF