Add GitHub workflows, release scripts, PR template

Add CI/CD and release automation assets: new GitHub Actions workflows (backend-foundation, hotfix-branch-creation, mobile-ci, product-release, web-quality), shell scripts for version/tag/release-note extraction and release-summary generation (.github/scripts/*), and a Pull Request template. Implements hotfix branch creation from tags, automatic tag name generation, version extraction from pubspec.yaml, CHANGELOG-based release notes extraction, selective mobile CI (detects changed files, builds and lints only affected Dart files), backend service test dry-runs, and automated GitHub release creation with summaries.
This commit is contained in:
Achintha Isuru
2026-03-05 12:40:13 -05:00
parent 73bd431518
commit dbbf54287f
10 changed files with 1156 additions and 0 deletions

48
.github/scripts/extract-version.sh vendored Executable file
View File

@@ -0,0 +1,48 @@
#!/bin/bash
# Extract version from version file for products
# Usage: ./extract-version.sh <app>
# app: worker-mobile-app or client-mobile-app
set -e
APP=$1
if [ -z "$APP" ]; then
echo "❌ Error: App parameter required (worker-mobile-app or client-mobile-app)"
exit 1
fi
# Determine pubspec path
if [ "$APP" = "worker-mobile-app" ]; then
PUBSPEC_PATH="apps/mobile/apps/staff/pubspec.yaml"
APP_NAME="Staff Product (Worker)"
else
PUBSPEC_PATH="apps/mobile/apps/client/pubspec.yaml"
APP_NAME="Client Product"
fi
# Check if pubspec exists
if [ ! -f "$PUBSPEC_PATH" ]; then
echo "❌ Error: pubspec.yaml not found at $PUBSPEC_PATH"
exit 1
fi
# Extract version (format: X.Y.Z+buildNumber)
VERSION_LINE=$(grep "^version:" "$PUBSPEC_PATH")
if [ -z "$VERSION_LINE" ]; then
echo "❌ Error: Could not find version in $PUBSPEC_PATH"
exit 1
fi
# Extract just the semantic version (before the +)
VERSION=$(echo "$VERSION_LINE" | sed 's/version: *//' | sed 's/+.*//' | tr -d ' ')
# Validate version format
if ! [[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "❌ Error: Invalid version format in pubspec.yaml: $VERSION"
echo "Expected format: X.Y.Z (e.g., 0.1.0)"
exit 1
fi
echo "✅ Extracted version from $PUBSPEC_PATH: $VERSION"
echo "$VERSION"