-
Notifications
You must be signed in to change notification settings - Fork 46
[CLNP-7524] chore: migrate CI configuration from CircleCI to GitHub Actions #259
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 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
f020aa9
chore: migrate CI configuration from CircleCI to GitHub Actions
OnestarLee 7d1c4e1
chore: migrate CI configuration from CircleCI to GitHub Actions and a…
OnestarLee 376e5b3
chore: migrate CI configuration from CircleCI to GitHub Actions and a…
OnestarLee 44c74f4
chore: migrate CI configuration from CircleCI to GitHub Actions and a…
OnestarLee 892f7a8
Update .github/workflows/comment-bot.yml
OnestarLee 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,128 @@ | ||
| # GitHub Actions CI/CD Configuration | ||
|
|
||
| This document describes how to set up and configure the GitHub Actions CI/CD pipeline for the Sendbird UIKit React Native project. | ||
|
|
||
| ## Overview | ||
|
|
||
| The GitHub Actions workflow handles automated deployment of both iOS and Android sample applications using modern authentication methods and optimized caching strategies. | ||
|
|
||
| ## Required GitHub Secrets | ||
|
|
||
| ### Shared | ||
|
|
||
| - **SENDBIRD_APP_ID** | ||
| - Your Sendbird application ID | ||
| - Used to configure the sample app environment | ||
|
|
||
| ### Android Deployment | ||
|
|
||
| - **FASTLANE_ANDROID_SERVICE_ACCOUNT** | ||
| - Create service account with Firebase App Distribution role from Google Cloud Console | ||
| - Download JSON key file | ||
| - Encode as base64: `cat service-account.json | base64` | ||
| - Save encoded text to GitHub Secrets | ||
| - Decoding reference: `echo "encoded-base64-text" | base64 --decode` | ||
|
|
||
| - **FASTLANE_ANDROID_APP_ID** | ||
| - Open your Firebase project settings → General | ||
| - Find your Android app (formatted like `1:xxxxxxxxxxxxxxxx:android:xxxxx`) | ||
| - Save app ID to GitHub Secrets | ||
|
|
||
| ### iOS Deployment | ||
|
|
||
| #### App Store Connect API Authentication (Recommended) | ||
|
|
||
| - **APP_STORE_CONNECT_API_KEY_ID** | ||
| - API Key ID from App Store Connect | ||
| - Format: 10-character alphanumeric string (e.g., `D83848D23B`) | ||
|
|
||
| - **APP_STORE_CONNECT_API_ISSUER_ID** | ||
| - API Key Issuer ID from App Store Connect | ||
| - Format: UUID (e.g., `227b0bbf-ada8-458c-9d62-3d8022b7d07f`) | ||
|
|
||
| - **APP_STORE_CONNECT_API_KEY** | ||
| - Private key content from the downloaded `.p8` file | ||
| - Include the full key with headers: | ||
| ``` | ||
| -----BEGIN PRIVATE KEY----- | ||
| [Key content] | ||
| -----END PRIVATE KEY----- | ||
| ``` | ||
|
|
||
| #### Certificate Management | ||
|
|
||
| - **FASTLANE_IOS_MATCH_GIT_URL** | ||
| - SSH URL to the private repository storing certificates | ||
| - Format: `git@github.com:organization/certificates-repo.git` | ||
| - Must use SSH format for authentication | ||
|
|
||
| - **FASTLANE_IOS_MATCH_GIT_PRIVATE_KEY** | ||
| - SSH private key for accessing the match repository | ||
| - Generate with: `ssh-keygen -t rsa -b 4096 -C "github-actions@sendbird.com"` | ||
| - Add the public key to the certificates repository as a deploy key | ||
| - Save the private key content to GitHub Secrets | ||
|
|
||
| - **FASTLANE_IOS_MATCH_PASSWORD** | ||
| - Password used to encrypt/decrypt certificates in the match repository | ||
| - Can be found in the match repository | ||
|
|
||
| ## How to Generate App Store Connect API Key | ||
|
|
||
| 1. **Login to App Store Connect** | ||
| - Go to [App Store Connect](https://appstoreconnect.apple.com) | ||
| - Sign in with your Apple ID | ||
|
|
||
| 2. **Navigate to API Keys** | ||
| - Users and Access → Integrations → App Store Connect API | ||
|
|
||
| 3. **Create New API Key** | ||
| - Click "Generate API Key" | ||
| - Set name: `GitHub Actions - Sendbird UIKit` | ||
| - Select access: `Developer` role | ||
| - Download the `.p8` file immediately (cannot re-download) | ||
|
|
||
| 4. **Configure GitHub Secrets** | ||
| - **Key ID**: Copy from the API key details page | ||
| - **Issuer ID**: Copy from the API key details page | ||
| - **Key Content**: Copy entire content of the `.p8` file | ||
|
|
||
| ## Workflow Features | ||
|
|
||
| ### Caching Strategy | ||
| - **Node.js Dependencies**: Cached based on `yarn.lock` hash | ||
| - **CocoaPods**: Cached based on `Podfile.lock` hash with validation | ||
| - **Ruby Gems**: Cached automatically by `ruby/setup-ruby` action | ||
|
|
||
| ### Security | ||
| - **SSH Authentication**: For accessing private certificate repositories | ||
| - **API Key Authentication**: Modern App Store Connect authentication | ||
| - **Secret Validation**: Pre-flight checks for required environment variables | ||
|
|
||
| ### Platform Support | ||
| - **iOS**: Automatic TestFlight deployment | ||
| - **Android**: Firebase App Distribution deployment | ||
| - **Conditional Execution**: Platform-specific deployment based on input selection | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| ### Common Issues | ||
|
|
||
| 1. **Pod Cache Validation Failures** | ||
| - Clear GitHub Actions cache for the repository | ||
| - Actions → Caches → Delete affected cache entries | ||
|
|
||
| 2. **SSH Authentication Failures** | ||
| - Verify the private key format (include headers and footers) | ||
| - Check if the public key is added to the certificates repository | ||
|
|
||
| 3. **App Store Connect API Errors** | ||
| - Verify all three API key components are correctly set | ||
| - Ensure the API key has sufficient permissions | ||
| - Check the `.p8` file content format | ||
|
|
||
| ## Maintenance | ||
|
|
||
| - **API Keys**: Renew App Store Connect API keys before expiration (typically 1 year) | ||
| - **Certificates**: Monitor certificate expiration dates in the match repository | ||
| - **SSH Keys**: Rotate SSH keys periodically for security | ||
| - **Dependencies**: Keep fastlane and related tools updated |
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
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.