#!/bin/bash # Generate release summary for GitHub Actions # Usage: ./create-release-summary.sh set -e APP=$1 ENV=$2 VERSION=$3 TAG_NAME=$4 if [ -z "$APP" ] || [ -z "$ENV" ] || [ -z "$VERSION" ] || [ -z "$TAG_NAME" ]; then echo "❌ Error: Missing required parameters" echo "Usage: ./create-release-summary.sh " exit 1 fi # Determine display names if [ "$APP" = "worker-mobile-app" ]; then APP_DISPLAY="Worker Product" APP_EMOJI="👷" else APP_DISPLAY="Client Product" APP_EMOJI="💼" fi ENV_UPPER=$(echo "$ENV" | tr '[:lower:]' '[:upper:]') RELEASE_NAME="Krow With Us - ${APP_DISPLAY} - ${ENV_UPPER} - v${VERSION}" # Environment emoji case "$ENV" in dev) ENV_EMOJI="🔧" ;; stage) ENV_EMOJI="🎭" ;; prod) ENV_EMOJI="🚀" ;; *) ENV_EMOJI="📦" ;; esac # Generate summary cat << EOF >> $GITHUB_STEP_SUMMARY ## 🎉 Release Created Successfully ### ${APP_EMOJI} Application Details - **App:** ${APP_DISPLAY} - **Environment:** ${ENV_EMOJI} ${ENV_UPPER} - **Version:** \`${VERSION}\` - **Tag:** \`${TAG_NAME}\` ### 📦 Release Information **Release Name:** ${RELEASE_NAME} ### ✅ Next Steps 1. 🔍 **Verify** the tag and release on GitHub 2. 🏗️ **Trigger** CodeMagic build (if configured) 3. 📱 **Monitor** app store deployment 4. 📚 **Update** project documentation if needed 5. 🎯 **Communicate** release to stakeholders ### 🔗 Quick Links - [View Tag](../../releases/tag/${TAG_NAME}) - [Release Documentation](../../docs/release/MOBILE_RELEASE_PLAN.md) - [CHANGELOG](../../apps/mobile/apps/${APP}/CHANGELOG.md) EOF echo "✅ Summary generated successfully"