diff --git a/.github/workflows/mobile-hotfix.yml b/.github/workflows/hotfix-branch-creation.yml similarity index 92% rename from .github/workflows/mobile-hotfix.yml rename to .github/workflows/hotfix-branch-creation.yml index a8261ef7..2732b458 100644 --- a/.github/workflows/mobile-hotfix.yml +++ b/.github/workflows/hotfix-branch-creation.yml @@ -10,8 +10,8 @@ on: options: - worker - client - production_tag: - description: '🏷️ Current Production Tag (e.g., krow-withus-worker-mobile/prod-v0.1.0)' + tag: + description: '🏷️ Current Tag (e.g., krow-withus-worker-mobile/prod-v0.1.0 or dev/stage)' required: true type: string issue_description: @@ -33,19 +33,19 @@ jobs: with: fetch-depth: 0 - - name: 🔍 Validate production tag exists + - name: 🔍 Validate tag exists id: validate_tag run: | - TAG="${{ github.event.inputs.production_tag }}" + TAG="${{ github.event.inputs.tag }}" if ! git rev-parse "$TAG" >/dev/null 2>&1; then - echo "❌ Error: Production tag '$TAG' does not exist" + echo "❌ Error: Tag '$TAG' does not exist" echo "Available tags:" - git tag -l "krow-withus-*-mobile/prod-*" | tail -10 + git tag -l "krow-withus-*-mobile/*" | tail -20 exit 1 fi - echo "✅ Production tag exists: $TAG" + echo "✅ Tag exists: $TAG" # Extract version from tag VERSION=$(echo "$TAG" | grep -oP 'v\K[0-9]+\.[0-9]+\.[0-9]+' || echo "") @@ -55,7 +55,7 @@ jobs: fi echo "current_version=${VERSION}" >> $GITHUB_OUTPUT - echo "📌 Current production version: $VERSION" + echo "📌 Current version: $VERSION" - name: 🔢 Calculate hotfix version id: hotfix_version @@ -93,15 +93,15 @@ jobs: echo "✅ Branch does not exist, proceeding..." - - name: 🌿 Create hotfix branch from production tag + - name: 🌿 Create hotfix branch from tag run: | - TAG="${{ github.event.inputs.production_tag }}" + TAG="${{ github.event.inputs.tag }}" BRANCH="${{ steps.branch.outputs.branch_name }}" git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" - # Checkout the production tag + # Checkout the tag git checkout "$TAG" # Create new branch @@ -193,7 +193,7 @@ HOTFIX: ${ISSUE} - Add CHANGELOG entry - Ready for bug fix commits -From production tag: ${{ github.event.inputs.production_tag }}" +From tag: ${{ github.event.inputs.tag }}" echo "✅ Committed version changes" @@ -223,11 +223,11 @@ From production tag: ${{ github.event.inputs.production_tag }}" PR_TITLE="🚨 HOTFIX: ${APP_DISPLAY} v${HOTFIX_VERSION} - ${ISSUE}" - PR_BODY="## 🚨 HOTFIX - URGENT PRODUCTION FIX + PR_BODY="## 🚨 HOTFIX - URGENT FIX **App:** ${APP_DISPLAY} **Version:** ${HOTFIX_VERSION} -**From:** \`${{ github.event.inputs.production_tag }}\` +**From:** \`${{ github.event.inputs.tag }}\` ### Issue ${ISSUE} @@ -289,7 +289,7 @@ git push origin krow-withus-${APP}-mobile/prod-v${HOTFIX_VERSION} echo "" >> $GITHUB_STEP_SUMMARY echo "**App:** ${{ github.event.inputs.app }}" >> $GITHUB_STEP_SUMMARY echo "**Issue:** ${{ github.event.inputs.issue_description }}" >> $GITHUB_STEP_SUMMARY - echo "**From Tag:** \`${{ github.event.inputs.production_tag }}\`" >> $GITHUB_STEP_SUMMARY + echo "**From Tag:** \`${{ github.event.inputs.tag }}\`" >> $GITHUB_STEP_SUMMARY echo "**Current Version:** ${{ steps.validate_tag.outputs.current_version }}" >> $GITHUB_STEP_SUMMARY echo "**Hotfix Version:** ${{ steps.hotfix_version.outputs.hotfix_version }}" >> $GITHUB_STEP_SUMMARY echo "**Branch:** \`${{ steps.branch.outputs.branch_name }}\`" >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/mobile-release.yml b/.github/workflows/product-release.yml similarity index 97% rename from .github/workflows/mobile-release.yml rename to .github/workflows/product-release.yml index 6ff12819..c66a80ca 100644 --- a/.github/workflows/mobile-release.yml +++ b/.github/workflows/product-release.yml @@ -112,9 +112,9 @@ jobs: # Generate release title if [ "$APP" = "worker" ]; then - APP_DISPLAY="Worker Product" + APP_DISPLAY="Worker Mobile Application" else - APP_DISPLAY="Client Product" + APP_DISPLAY="Client Mobile Application" fi ENV_UPPER=$(echo "$ENV" | tr '[:lower:]' '[:upper:]')