Add iOS release script #65
Workflow file for this run
This file contains 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: Release Apps | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref }} | |
cancel-in-progress: true | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- develop | |
push: | |
branches: | |
- develop | |
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 output.ipa --app 1:408505141940:ios:1d2339892d9ffd8cc325e1 --token 1//0gjWcMdJYEpEcCgYIARAAGBASNwF-L9IrcDSgY5biRN0sdBG_oa4rSkmwGdb4wv0Kf30mhAmWwg6UFHN-21NskMGsriwsjI7eRdI --release-notes-file ../ExampleAppChangelog.txt --groups internal,External | |
# - name: Publish artifact | |
# uses: actions/upload-artifact@v4 | |
# with: | |
# name: ipa-artifact | |
# path: ./output.ipa | |
# - 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 }} | |
# send_ipa_firebase: | |
# name: Send IPA to Firebase | |
# needs: release_ios_app | |
# runs-on: ubuntu-latest | |
# timeout-minutes: 30 | |
# steps: | |
# - name: Checkout Repository | |
# uses: actions/checkout@v4 | |
# - name: Download artifact | |
# id: download-artifact | |
# uses: actions/download-artifact@v4 | |
# with: | |
# name: ipa-artifact | |
# - name: Unzip files | |
# run: | | |
# unzip ${{ steps.download-artifact.outputs.download-path }}/ipa.zip -d ${{ steps.download-artifact.outputs.download-path }} | |
# - 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: ${{ steps.download-artifact.outputs.download-path }}/output.ipa | |
# - 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 |