Skip to content

Release Apps

Release Apps #67

Workflow file for this run

name: Release Apps
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
on:
workflow_dispatch:
push:
branches:
- release
permissions:
checks: write
contents: read
jobs:
release_android_app:
name: Release Android App
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: 11
distribution: zulu
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 16
- name: Create Release APK
run: |
cd ./packages/react-native-hms
npm install
cd ../react-native-room-kit
npm install
cd ./example
npm install
cd ./android
chmod +x ./gradlew
./gradlew assembleRelease
- name: Upload artifact to Firebase App Distribution
uses: wzieba/[email protected]
with:
appId: ${{ secrets.FIREBASE_APP_ID }}
serviceCredentialsFileContent: ${{ secrets.CREDENTIAL_FILE_CONTENT }}
groups: internal, External
releaseNotesFile: ./packages/react-native-room-kit/example/ExampleAppChangelog.txt
file: ./packages/react-native-room-kit/example/android/app/build/outputs/apk/release/app-release.apk
- name: Extract Branch Name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Post Slack Notification
uses: rtCamp/[email protected]
env:
SLACK_CHANNEL: dogfooding
SLACK_COLOR: ${{ job.status }}
SLACK_ICON_EMMOJI: ":react:"
SLACK_USERNAME: React Native Bot
SLACK_WEBHOOK: ${{ secrets.SLACK_URL }}
SLACK_TITLE: ":react: 🎉 React Native Android App released! 🎊 :react:"
SLACK_MESSAGE: 📝 Changelog 🔗 https://github.com/100mslive/100ms-react-native/blob/${{ steps.extract_branch.outputs.branch }}/packages/react-native-room-kit/example/ExampleAppChangelog.txt
SLACK_FOOTER: 🤖 Download from Firebase 👉 https://appdistribution.firebase.dev/i/7b7ab3b30e627c35
release_ios_app:
name: Release iOS App
runs-on: macOS-latest
timeout-minutes: 60
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: 11
distribution: zulu
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 16
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
bundler-cache: true
- name: Install Node Modules
run: |
cd ./packages/react-native-hms
npm install
cd ../react-native-room-kit
npm install
cd ./example
npm install
- name: Install Pods
run: |
sudo gem install cocoapods
cd ./packages/react-native-room-kit/example/ios
pod install
- name: Build iOS App for Firebase App Distribution
uses: yukiarrr/[email protected]
with:
project-path: packages/react-native-room-kit/example/ios/RNExample.xcodeproj
p12-base64: ${{ secrets.IOS_P12_BASE64 }}
certificate-password: ${{ secrets.IOS_CERTIFICATE_PASSWORD }}
mobileprovision-base64: |
${{ secrets.ADHOC_MOBILEPROVISION_BASE64 }}
${{ secrets.ADHOCEXTENSION_MOBILEPROVISION_BASE64 }}
code-signing-identity: iPhone Distribution
team-id: ${{ secrets.IOS_TEAM_ID }}
workspace-path: packages/react-native-room-kit/example/ios/RNExample.xcworkspace
scheme: RNExample
export-method: ad-hoc
export-options: packages/react-native-room-kit/example/ios/ExportOptions.plist
- name: Deploy to Firebase
run: |
cd ./packages/react-native-room-kit/example/ios
npm install -g [email protected]
firebase appdistribution:distribute $GITHUB_WORKSPACE/output.ipa --app ${{ secrets.FIREBASE_APP_ID }} --token ${{ secrets.FIREBASE_TOKEN }} --release-notes-file ../ExampleAppChangelog.txt --groups internal,External
- name: Build iOS App for TestFlight
uses: yukiarrr/[email protected]
with:
project-path: packages/react-native-room-kit/example/ios/RNExample.xcodeproj
p12-base64: ${{ secrets.IOS_P12_BASE64 }}
certificate-password: ${{ secrets.IOS_CERTIFICATE_PASSWORD }}
mobileprovision-base64: |
${{ secrets.APPSTORE_MOBILEPROVISION_BASE64 }}
${{ secrets.APPSTORE_BROADCAST_MOBILEPROVISION_BASE64 }}
code-signing-identity: iPhone Distribution
team-id: ${{ secrets.IOS_TEAM_ID }}
workspace-path: packages/react-native-room-kit/example/ios/RNExample.xcworkspace
scheme: RNExample
export-options: packages/react-native-room-kit/example/ios/AppStoreExportOptions.plist
output-path: ./packages/output.ipa
- name: Upload app to TestFlight
uses: apple-actions/upload-testflight-build@v1
with:
app-path: ./packages/output.ipa
issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }}
api-key-id: ${{ secrets.APPSTORE_API_KEY_ID }}
api-private-key: ${{ secrets.APPSTORE_API_PRIVATE_KEY }}
- name: Extract Branch Name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Post Slack Notification
uses: rtCamp/[email protected]
env:
SLACK_CHANNEL: dogfooding
SLACK_COLOR: ${{ job.status }}
SLACK_ICON_EMMOJI: ":react:"
SLACK_USERNAME: React Native Bot
SLACK_WEBHOOK: ${{ secrets.SLACK_URL }}
SLACK_TITLE: ":react: 🎉 React Native iOS App released! 🎊 :react:"
SLACK_MESSAGE: 📝 Changelog 🔗 https://github.com/100mslive/100ms-react-native/blob/${{ steps.extract_branch.outputs.branch }}/packages/react-native-room-kit/example/ExampleAppChangelog.txt
SLACK_FOOTER: 🍎 Download from Firebase 👉 https://appdistribution.firebase.dev/i/bdfa6517b69c31d6 🍎 Download from TestFlight 👉 https://testflight.apple.com/join/v4bSIPad