-
Notifications
You must be signed in to change notification settings - Fork 0
feat(infra): add Render staging + refactor CI/CD workflows #65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
94573ad
fix(deploy): add baseUrl for GitHub Pages and disable caching
jbdevprimary 418a32f
Merge branch 'main' of github.com:agentic-dev-library/thumbcode
jbdevprimary 523faea
feat(infra): add Render staging + refactor CI/CD workflows
jbdevprimary 5a38a49
fix(infra): address code review findings
jbdevprimary e332f68
fix(cd): add Android submission credentials + fix render.yaml header …
jbdevprimary b111e5b
fix(cd): remove app store submissions pending credential setup
jbdevprimary 7cdcfd1
fix(cd): properly skip EAS update steps when EXPO_TOKEN missing
jbdevprimary 15edabe
fix(cd): add package.json to PR path filters
jbdevprimary 04a9270
feat(ci): add EAS Workflows for automated CI/CD
jbdevprimary e088254
docs: add market research and 1.0 roadmap to development log
jbdevprimary e73e8b4
fix: address CodeRabbit review findings
jbdevprimary 784fbe2
feat(eas): configure EAS project with proper credentials
jbdevprimary 3e0684b
feat(eas): add expo-updates for OTA support
jbdevprimary File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| name: Create development builds | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| - release/* | ||
|
|
||
| jobs: | ||
| build_android: | ||
| name: Build Android (dev) | ||
| type: build | ||
| params: | ||
| platform: android | ||
| profile: development | ||
|
|
||
| build_ios_simulator: | ||
| name: Build iOS Simulator (dev) | ||
| type: build | ||
| params: | ||
| platform: ios | ||
| profile: preview |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| name: Publish preview update | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - '*' | ||
| - '!main' | ||
|
|
||
| jobs: | ||
| publish_preview: | ||
| name: Publish preview update | ||
| type: update | ||
| params: | ||
| branch: ${{ github.ref_name || 'preview' }} |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| name: Deploy to production | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
|
|
||
| jobs: | ||
| fingerprint: | ||
| name: Fingerprint | ||
| type: fingerprint | ||
|
|
||
| # NOTE: get-build intentionally uses default behavior (completed builds only). | ||
| # If a build is in-progress, we skip and let it complete on its own. | ||
| # This prevents duplicate builds and OTA updates that would race with ongoing builds. | ||
| # Set wait_for_in_progress: true if you want to wait for in-progress builds instead. | ||
| get_android_build: | ||
| name: Check existing Android build | ||
| needs: [fingerprint] | ||
| type: get-build | ||
| params: | ||
| fingerprint_hash: ${{ needs.fingerprint.outputs.android_fingerprint_hash }} | ||
| profile: production | ||
|
|
||
| get_ios_build: | ||
| name: Check existing iOS build | ||
| needs: [fingerprint] | ||
| type: get-build | ||
| params: | ||
| fingerprint_hash: ${{ needs.fingerprint.outputs.ios_fingerprint_hash }} | ||
| profile: production | ||
|
|
||
| build_android: | ||
| name: Build Android | ||
| needs: [get_android_build] | ||
| if: ${{ !needs.get_android_build.outputs.build_id }} | ||
| type: build | ||
| params: | ||
| platform: android | ||
| profile: production | ||
|
|
||
| build_ios: | ||
| name: Build iOS | ||
| needs: [get_ios_build] | ||
| if: ${{ !needs.get_ios_build.outputs.build_id }} | ||
| type: build | ||
| params: | ||
| platform: ios | ||
| profile: production | ||
|
|
||
| publish_android_update: | ||
| name: Publish Android OTA update | ||
| needs: [get_android_build] | ||
| if: ${{ needs.get_android_build.outputs.build_id }} | ||
| type: update | ||
| params: | ||
| branch: production | ||
| platform: android | ||
|
|
||
| publish_ios_update: | ||
| name: Publish iOS OTA update | ||
| needs: [get_ios_build] | ||
| if: ${{ needs.get_ios_build.outputs.build_id }} | ||
| type: update | ||
| params: | ||
| branch: production | ||
| platform: ios | ||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,185 @@ | ||
| name: CD | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| paths: | ||
| - 'src/**' | ||
| - 'app.json' | ||
| - 'eas.json' | ||
| - 'package.json' | ||
| pull_request: | ||
| branches: [main] | ||
| paths: | ||
| - 'src/**' | ||
| - 'app.json' | ||
| - 'eas.json' | ||
| - 'package.json' | ||
| workflow_dispatch: | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| inputs: | ||
| platform: | ||
| description: 'Platform to build' | ||
| required: true | ||
| default: 'all' | ||
| type: choice | ||
| options: | ||
| - all | ||
| - android | ||
| - ios | ||
| - web | ||
| profile: | ||
| description: 'Build profile' | ||
| required: true | ||
| default: 'preview' | ||
| type: choice | ||
| options: | ||
| - development | ||
| - preview | ||
| - production | ||
|
|
||
| # Prevent concurrent deployments | ||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: false | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| # ============================================ | ||
| # EAS Update for PRs (OTA Updates) | ||
| # ============================================ | ||
| eas-update: | ||
| name: EAS Update (PR Preview) | ||
| if: github.event_name == 'pull_request' | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 15 | ||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
|
|
||
| steps: | ||
| - name: Check for EXPO_TOKEN | ||
| id: check-token | ||
| env: | ||
| EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }} | ||
| run: | | ||
| if [ -z "$EXPO_TOKEN" ]; then | ||
| echo "::warning::EXPO_TOKEN secret is not configured. Skipping EAS update." | ||
| echo "Learn more: https://docs.expo.dev/eas-update/github-actions" | ||
| echo "has_token=false" >> $GITHUB_OUTPUT | ||
| else | ||
| echo "has_token=true" >> $GITHUB_OUTPUT | ||
| fi | ||
|
|
||
| - name: Checkout code | ||
| if: steps.check-token.outputs.has_token == 'true' | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
|
|
||
| - name: Setup ThumbCode environment | ||
| if: steps.check-token.outputs.has_token == 'true' | ||
| uses: ./.github/actions/setup-thumbcode | ||
|
|
||
| - name: Setup Expo and EAS | ||
| if: steps.check-token.outputs.has_token == 'true' | ||
| uses: expo/expo-github-action@c7b66a9c327a43a8fa7c0158e7f30d6040d2481e # v8 | ||
| with: | ||
| eas-version: latest | ||
| token: ${{ secrets.EXPO_TOKEN }} | ||
|
|
||
| - name: Create preview update | ||
| if: steps.check-token.outputs.has_token == 'true' | ||
| uses: expo/expo-github-action/preview@c7b66a9c327a43a8fa7c0158e7f30d6040d2481e # v8 | ||
| with: | ||
| command: eas update --auto | ||
| env: | ||
| # Use production slug to match EAS project configuration | ||
| EXPO_PUBLIC_APP_ENV: production | ||
|
|
||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| # ============================================ | ||
| # EAS Build - Android | ||
| # ============================================ | ||
| build-android: | ||
| name: Build Android | ||
| if: | | ||
| (github.event_name == 'push' && github.ref == 'refs/heads/main') || | ||
| (github.event_name == 'workflow_dispatch' && (github.event.inputs.platform == 'all' || github.event.inputs.platform == 'android')) | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 60 | ||
|
|
||
| steps: | ||
| - name: Check for EXPO_TOKEN | ||
| env: | ||
| EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }} | ||
| run: | | ||
| if [ -z "$EXPO_TOKEN" ]; then | ||
| echo "::error::EXPO_TOKEN secret is required for EAS builds" | ||
| exit 1 | ||
| fi | ||
|
|
||
| - name: Checkout code | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
|
|
||
| - name: Setup ThumbCode environment | ||
| uses: ./.github/actions/setup-thumbcode | ||
|
|
||
| - name: Setup Expo and EAS | ||
| uses: expo/expo-github-action@c7b66a9c327a43a8fa7c0158e7f30d6040d2481e # v8 | ||
| with: | ||
| eas-version: latest | ||
| token: ${{ secrets.EXPO_TOKEN }} | ||
|
|
||
| - name: Build Android | ||
| run: | | ||
| PROFILE="${{ github.event.inputs.profile || 'preview' }}" | ||
| eas build --platform android --profile $PROFILE --non-interactive --no-wait | ||
|
|
||
| # ============================================ | ||
| # EAS Build - iOS | ||
| # ============================================ | ||
| build-ios: | ||
| name: Build iOS | ||
| if: | | ||
| (github.event_name == 'push' && github.ref == 'refs/heads/main') || | ||
| (github.event_name == 'workflow_dispatch' && (github.event.inputs.platform == 'all' || github.event.inputs.platform == 'ios')) | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 60 | ||
|
|
||
| steps: | ||
| - name: Check for EXPO_TOKEN | ||
| env: | ||
| EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }} | ||
| run: | | ||
| if [ -z "$EXPO_TOKEN" ]; then | ||
| echo "::error::EXPO_TOKEN secret is required for EAS builds" | ||
| exit 1 | ||
| fi | ||
|
|
||
| - name: Checkout code | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
|
|
||
| - name: Setup ThumbCode environment | ||
| uses: ./.github/actions/setup-thumbcode | ||
|
|
||
| - name: Setup Expo and EAS | ||
| uses: expo/expo-github-action@c7b66a9c327a43a8fa7c0158e7f30d6040d2481e # v8 | ||
| with: | ||
| eas-version: latest | ||
| token: ${{ secrets.EXPO_TOKEN }} | ||
|
|
||
| - name: Build iOS | ||
| run: | | ||
| PROFILE="${{ github.event.inputs.profile || 'preview' }}" | ||
| eas build --platform ios --profile $PROFILE --non-interactive --no-wait | ||
|
|
||
| # ============================================ | ||
| # NOTE: App Store Submissions | ||
| # ============================================ | ||
| # Production submission jobs are not yet configured. | ||
| # See issue #66 for required credentials and setup. | ||
| # | ||
| # Current release strategy: | ||
| # - Web staging: Automatic via Render.com (render.yaml) | ||
| # - Mobile builds: Download from expo.dev after EAS build completes | ||
| # - Debug APK: Can be downloaded from expo.dev build artifacts | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.