Update phonenumbers live support labels #96
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Mobile Builds (EAS) | |
| on: | |
| push: | |
| branches: [master] | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| inputs: | |
| platform: | |
| description: 'Build platform' | |
| required: true | |
| default: 'all' | |
| type: choice | |
| options: | |
| - all | |
| - ios | |
| - android | |
| profile: | |
| description: 'Build profile' | |
| required: true | |
| default: 'preview' | |
| type: choice | |
| options: | |
| - development | |
| - preview | |
| - production | |
| submit: | |
| description: 'Auto-submit to stores' | |
| required: false | |
| default: false | |
| type: boolean | |
| workflow_call: | |
| jobs: | |
| build-ios: | |
| name: Build iOS | |
| runs-on: ubuntu-latest | |
| if: ${{ !inputs.platform || inputs.platform == 'all' || inputs.platform == 'ios' }} | |
| timeout-minutes: 60 | |
| defaults: | |
| run: | |
| working-directory: mobile | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: latest | |
| - run: pnpm install | |
| - name: Patch expo-modules-core for Node compat | |
| run: | | |
| # expo-modules-core ships raw .ts as "main" which Node can't load. | |
| # EAS builds happen remotely; we just need config resolution to not crash. | |
| EMC_DIR=$(find node_modules -path '*/expo-modules-core/src/index.ts' -print -quit 2>/dev/null | xargs dirname 2>/dev/null || true) | |
| if [ -n "$EMC_DIR" ]; then | |
| echo "module.exports = {};" > "$EMC_DIR/index.js" | |
| sed -i 's|"main": "src/index.ts"|"main": "src/index.js"|' "$EMC_DIR/../package.json" | |
| echo "Patched expo-modules-core at $EMC_DIR" | |
| fi | |
| - name: Check EXPO_TOKEN | |
| id: check | |
| run: | | |
| if [ -z "${{ secrets.EXPO_TOKEN }}" ]; then | |
| echo "skip=true" >> "$GITHUB_OUTPUT" | |
| echo "⚠ EXPO_TOKEN not set — skipping build" | |
| else | |
| echo "skip=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Setup EAS | |
| if: steps.check.outputs.skip != 'true' | |
| uses: expo/expo-github-action@v8 | |
| with: | |
| eas-version: latest | |
| token: ${{ secrets.EXPO_TOKEN }} | |
| - name: Build iOS | |
| if: steps.check.outputs.skip != 'true' | |
| run: | | |
| PROFILE="${{ inputs.profile || 'preview' }}" | |
| if [[ "$GITHUB_REF" == refs/tags/v* ]]; then | |
| PROFILE="production" | |
| fi | |
| echo "Building iOS with profile: $PROFILE" | |
| eas build --platform ios --profile $PROFILE --non-interactive | |
| - name: Submit to TestFlight | |
| if: steps.check.outputs.skip != 'true' && (inputs.submit || startsWith(github.ref, 'refs/tags/v')) | |
| run: eas submit --platform ios --latest --non-interactive | |
| continue-on-error: true | |
| build-android: | |
| name: Build Android | |
| runs-on: ubuntu-latest | |
| if: ${{ !inputs.platform || inputs.platform == 'all' || inputs.platform == 'android' }} | |
| timeout-minutes: 60 | |
| defaults: | |
| run: | |
| working-directory: mobile | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: latest | |
| - run: pnpm install | |
| - name: Patch expo-modules-core for Node compat | |
| run: | | |
| EMC_DIR=$(find node_modules -path '*/expo-modules-core/src/index.ts' -print -quit 2>/dev/null | xargs dirname 2>/dev/null || true) | |
| if [ -n "$EMC_DIR" ]; then | |
| echo "module.exports = {};" > "$EMC_DIR/index.js" | |
| sed -i 's|"main": "src/index.ts"|"main": "src/index.js"|' "$EMC_DIR/../package.json" | |
| fi | |
| - name: Check EXPO_TOKEN | |
| id: check | |
| run: | | |
| if [ -z "${{ secrets.EXPO_TOKEN }}" ]; then | |
| echo "skip=true" >> "$GITHUB_OUTPUT" | |
| echo "⚠ EXPO_TOKEN not set — skipping build" | |
| else | |
| echo "skip=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Setup EAS | |
| if: steps.check.outputs.skip != 'true' | |
| uses: expo/expo-github-action@v8 | |
| with: | |
| eas-version: latest | |
| token: ${{ secrets.EXPO_TOKEN }} | |
| - name: Build Android | |
| if: steps.check.outputs.skip != 'true' | |
| run: | | |
| PROFILE="${{ inputs.profile || 'preview' }}" | |
| if [[ "$GITHUB_REF" == refs/tags/v* ]]; then | |
| PROFILE="production" | |
| fi | |
| echo "Building Android with profile: $PROFILE" | |
| eas build --platform android --profile $PROFILE --non-interactive | |
| - name: Submit to Google Play | |
| if: steps.check.outputs.skip != 'true' && (inputs.submit || startsWith(github.ref, 'refs/tags/v')) | |
| run: eas submit --platform android --latest --non-interactive | |
| continue-on-error: true | |
| publish-mobile-release: | |
| name: Publish Mobile Release | |
| runs-on: ubuntu-latest | |
| needs: [build-ios, build-android] | |
| if: always() && (needs.build-ios.result == 'success' || needs.build-android.result == 'success') | |
| defaults: | |
| run: | |
| working-directory: mobile | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: latest | |
| - run: pnpm install | |
| - name: Patch expo-modules-core for Node compat | |
| run: | | |
| EMC_DIR=$(find node_modules -path '*/expo-modules-core/src/index.ts' -print -quit 2>/dev/null | xargs dirname 2>/dev/null || true) | |
| if [ -n "$EMC_DIR" ]; then | |
| echo "module.exports = {};" > "$EMC_DIR/index.js" | |
| sed -i 's|"main": "src/index.ts"|"main": "src/index.js"|' "$EMC_DIR/../package.json" | |
| fi | |
| - name: Check EXPO_TOKEN | |
| id: check | |
| run: | | |
| if [ -z "${{ secrets.EXPO_TOKEN }}" ]; then | |
| echo "skip=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "skip=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Setup EAS | |
| if: steps.check.outputs.skip != 'true' | |
| uses: expo/expo-github-action@v8 | |
| with: | |
| eas-version: latest | |
| token: ${{ secrets.EXPO_TOKEN }} | |
| - name: Push OTA Update | |
| if: steps.check.outputs.skip != 'true' | |
| run: | | |
| VERSION=$(node -p "require('../package.json').version") | |
| eas update --branch preview --message "v${VERSION}" --non-interactive | |
| continue-on-error: true | |
| - name: Get build URLs | |
| if: steps.check.outputs.skip != 'true' | |
| id: builds | |
| run: | | |
| echo "## 📱 Mobile Builds" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "Builds are available on [Expo Dashboard](https://expo.dev/accounts/profullstack/projects/smshub/builds)" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "- **iOS:** Install via TestFlight (once Apple review completes)" >> $GITHUB_STEP_SUMMARY | |
| echo "- **Android:** Download APK from Expo dashboard or install via internal distribution" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "### OTA Update" >> $GITHUB_STEP_SUMMARY | |
| echo "Existing installs will receive an over-the-air update automatically." >> $GITHUB_STEP_SUMMARY |