diff --git a/.github/actions/build-android/action.yml b/.github/actions/build-android/action.yml index 0e8e375b101..9e88cce61a3 100644 --- a/.github/actions/build-android/action.yml +++ b/.github/actions/build-android/action.yml @@ -1,29 +1,11 @@ name: 'Build Android' description: 'Builds Android app AAB and uploads manifest and AAB' inputs: - type: - description: 'Build type: official or experimental' - required: true BUILD_VERSION: description: 'Build version for build' required: true - BUGSNAG_KEY: - description: 'Bugsnag API key for build' - required: true - KEYSTORE_EXPERIMENTAL_BASE64: - description: 'Base64 encoded keystore for experimental build' - required: true - KEYSTORE_EXPERIMENTAL: - description: 'Keystore file name for experimental build' - required: true - KEYSTORE_EXPERIMENTAL_PASSWORD: - description: 'Keystore password for experimental build' - required: true - KEYSTORE_EXPERIMENTAL_ALIAS: - description: 'Keystore alias for experimental build' - required: true GOOGLE_SERVICES_ANDROID: - description: 'Google services JSON for experimental build' + description: 'Google services JSON' required: true BUGSNAG_KEY_OFFICIAL: description: 'Bugsnag API key for official build' @@ -63,16 +45,11 @@ runs: key: gradle-${{ hashFiles('android/**.gradle*', 'android/**/gradle-wrapper.properties') }} restore-keys: | gradle- - + - name: Decode Keystore working-directory: android/app run: | - if [[ "${{ inputs.type }}" == "experimental" ]]; then - echo "${{ inputs.KEYSTORE_EXPERIMENTAL_BASE64 }}" | base64 -d > "${{ inputs.KEYSTORE_EXPERIMENTAL }}" - fi - if [[ "${{ inputs.type }}" == "official" ]]; then - echo "${{ inputs.KEYSTORE_OFFICIAL_BASE64 }}" | base64 -d > "${{ inputs.KEYSTORE_OFFICIAL }}" - fi + echo "${{ inputs.KEYSTORE_OFFICIAL_BASE64 }}" | base64 -d > "${{ inputs.KEYSTORE_OFFICIAL }}" shell: bash - name: Set gradle.properties @@ -86,24 +63,12 @@ runs: echo -e "newArchEnabled=true" >> ./gradle.properties echo -e "hermesEnabled=true" >> ./gradle.properties echo -e "VERSIONCODE=${{ inputs.BUILD_VERSION }}" >> ./gradle.properties - - if [[ "${{ inputs.type }}" == "experimental" ]]; then - echo -e "APPLICATION_ID=chat.rocket.reactnative" >> ./gradle.properties - echo -e "BugsnagAPIKey=${{ inputs.BUGSNAG_KEY }}" >> ./gradle.properties - echo -e "KEYSTORE=${{ inputs.KEYSTORE_EXPERIMENTAL }}" >> ./gradle.properties - echo -e 'KEYSTORE_PASSWORD=${{ inputs.KEYSTORE_EXPERIMENTAL_PASSWORD }}' >> ./gradle.properties - echo -e "KEY_ALIAS=${{ inputs.KEYSTORE_EXPERIMENTAL_ALIAS }}" >> ./gradle.properties - echo -e 'KEY_PASSWORD=${{ inputs.KEYSTORE_EXPERIMENTAL_PASSWORD }}' >> ./gradle.properties - fi - - if [[ "${{ inputs.type }}" == "official" ]]; then - echo -e "APPLICATION_ID=chat.rocket.android" >> ./gradle.properties - echo -e "BugsnagAPIKey=${{ inputs.BUGSNAG_KEY_OFFICIAL }}" >> ./gradle.properties - echo -e "KEYSTORE=${{ inputs.KEYSTORE_OFFICIAL }}" >> ./gradle.properties - echo -e 'KEYSTORE_PASSWORD=${{ inputs.KEYSTORE_OFFICIAL_PASSWORD }}' >> ./gradle.properties - echo -e "KEY_ALIAS=${{ inputs.KEYSTORE_OFFICIAL_ALIAS }}" >> ./gradle.properties - echo -e 'KEY_PASSWORD=${{ inputs.KEYSTORE_OFFICIAL_PASSWORD }}' >> ./gradle.properties - fi + echo -e "APPLICATION_ID=chat.rocket.android" >> ./gradle.properties + echo -e "BugsnagAPIKey=${{ inputs.BUGSNAG_KEY_OFFICIAL }}" >> ./gradle.properties + echo -e "KEYSTORE=${{ inputs.KEYSTORE_OFFICIAL }}" >> ./gradle.properties + echo -e 'KEYSTORE_PASSWORD=${{ inputs.KEYSTORE_OFFICIAL_PASSWORD }}' >> ./gradle.properties + echo -e "KEY_ALIAS=${{ inputs.KEYSTORE_OFFICIAL_ALIAS }}" >> ./gradle.properties + echo -e 'KEY_PASSWORD=${{ inputs.KEYSTORE_OFFICIAL_PASSWORD }}' >> ./gradle.properties shell: bash - name: Set Google Services JSON @@ -116,36 +81,16 @@ runs: - name: Build Android Release AAB working-directory: android - run: | - if [[ "${{ inputs.type }}" == "experimental" ]]; then - ./gradlew bundleExperimentalRelease - fi - if [[ "${{ inputs.type }}" == "official" ]]; then - ./gradlew bundleOfficialRelease - fi + run: ./gradlew bundleOfficialRelease shell: bash - name: Upload sourcemaps/NDK symbols to Bugsnag run: | - if [[ "${{ inputs.type }}" == "official" ]]; then - pnpm bugsnag:upload-android --variant officialRelease --app-manifest android/app/build/intermediates/merged_manifests/officialRelease/processOfficialReleaseManifest/AndroidManifest.xml - pnpm exec bugsnag-cli upload android-aab android/app/build/outputs/bundle/officialRelease/app-official-release.aab - fi - if [[ "${{ inputs.type }}" == "experimental" ]]; then - pnpm bugsnag:upload-android --variant experimentalRelease --app-manifest android/app/build/intermediates/merged_manifests/experimentalRelease/processExperimentalReleaseManifest/AndroidManifest.xml - pnpm exec bugsnag-cli upload android-aab android/app/build/outputs/bundle/experimentalRelease/app-experimental-release.aab - fi + pnpm bugsnag:upload-android --variant officialRelease --app-manifest android/app/build/intermediates/merged_manifests/officialRelease/processOfficialReleaseManifest/AndroidManifest.xml + pnpm exec bugsnag-cli upload android-aab android/app/build/outputs/bundle/officialRelease/app-official-release.aab shell: bash - - name: Upload Experimental AAB - if: ${{ inputs.type == 'experimental' }} - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - with: - name: android-aab-experimental - path: android/app/build/outputs/bundle/experimentalRelease/app-experimental-release.aab - - name: Upload Official AAB - if: ${{ inputs.type == 'official' }} uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: name: android-aab-official diff --git a/.github/actions/build-ios/action.yml b/.github/actions/build-ios/action.yml index f750802740a..3bd645e3bee 100644 --- a/.github/actions/build-ios/action.yml +++ b/.github/actions/build-ios/action.yml @@ -1,18 +1,12 @@ name: 'Build iOS' description: 'Build iOS app' inputs: - type: - description: 'Build type: official or experimental' - required: true BUILD_VERSION: description: 'Build version' required: true APP_STORE_CONNECT_API_KEY_BASE64: description: 'Base64 encoded App Store Connect API Key' required: true - BUGSNAG_KEY: - description: 'Bugsnag API Key' - required: true MATCH_KEYCHAIN_NAME: description: 'Match Keychain Name' required: true @@ -37,9 +31,6 @@ inputs: GOOGLE_SERVICES_IOS: description: 'Google service file for official version' required: true - GOOGLE_SERVICES_IOS_EXPERIMENTAL: - description: 'Google service file for experimental version' - required: true runs: using: "composite" @@ -85,43 +76,24 @@ runs: working-directory: ios run: | agvtool new-version -all ${{ inputs.BUILD_VERSION }} - if [[ ${{ inputs.type }} == "official" ]]; then - /usr/libexec/PlistBuddy -c "Set :bugsnag:apiKey ${{ inputs.BUGSNAG_KEY_OFFICIAL }}" ./RocketChatRN/Info.plist - /usr/libexec/PlistBuddy -c "Set :bugsnag:apiKey ${{ inputs.BUGSNAG_KEY_OFFICIAL }}" ./ShareRocketChatRN/Info.plist - /usr/libexec/PlistBuddy -c "Set IS_OFFICIAL YES" ./RocketChatRN/Info.plist - /usr/libexec/PlistBuddy -c "Set IS_OFFICIAL YES" ./ShareRocketChatRN/Info.plist - /usr/libexec/PlistBuddy -c "Set IS_OFFICIAL YES" ./NotificationService/Info.plist - fi - if [[ ${{ inputs.type }} == "experimental" ]]; then - /usr/libexec/PlistBuddy -c "Set :bugsnag:apiKey ${{ inputs.BUGSNAG_KEY }}" ./RocketChatRN/Info.plist - /usr/libexec/PlistBuddy -c "Set :bugsnag:apiKey ${{ inputs.BUGSNAG_KEY }}" ./ShareRocketChatRN/Info.plist - /usr/libexec/PlistBuddy -c "Set IS_OFFICIAL NO" ./RocketChatRN/Info.plist - /usr/libexec/PlistBuddy -c "Set IS_OFFICIAL NO" ./ShareRocketChatRN/Info.plist - /usr/libexec/PlistBuddy -c "Set IS_OFFICIAL NO" ./NotificationService/Info.plist - fi + /usr/libexec/PlistBuddy -c "Set :bugsnag:apiKey ${{ inputs.BUGSNAG_KEY_OFFICIAL }}" ./RocketChatRN/Info.plist + /usr/libexec/PlistBuddy -c "Set :bugsnag:apiKey ${{ inputs.BUGSNAG_KEY_OFFICIAL }}" ./ShareRocketChatRN/Info.plist + /usr/libexec/PlistBuddy -c "Set IS_OFFICIAL YES" ./RocketChatRN/Info.plist + /usr/libexec/PlistBuddy -c "Set IS_OFFICIAL YES" ./ShareRocketChatRN/Info.plist + /usr/libexec/PlistBuddy -c "Set IS_OFFICIAL YES" ./NotificationService/Info.plist shell: bash - name: Set Google Services working-directory: ios run: | if [[ $APP_STORE_CONNECT_API_KEY_BASE64 ]]; then - if [[ ${{ inputs.type }} == "official" ]]; then - echo ${{ inputs.GOOGLE_SERVICES_IOS }} | base64 --decode > GoogleService-Info.plist - else - echo ${{ inputs.GOOGLE_SERVICES_IOS_EXPERIMENTAL }} | base64 --decode > GoogleService-Info.plist - fi + echo ${{ inputs.GOOGLE_SERVICES_IOS }} | base64 --decode > GoogleService-Info.plist fi shell: bash - name: Build iOS app working-directory: ios - run: | - if [[ ${{ inputs.type }} == "official" ]]; then - bundle exec fastlane ios build_official - fi - if [[ ${{ inputs.type }} == "experimental" ]]; then - bundle exec fastlane ios build_experimental - fi + run: bundle exec fastlane ios build_official env: MATCH_KEYCHAIN_NAME: ${{ inputs.MATCH_KEYCHAIN_NAME }} MATCH_KEYCHAIN_PASSWORD: ${{ inputs.MATCH_KEYCHAIN_PASSWORD }} @@ -133,42 +105,18 @@ runs: - name: Upload IPA artifact uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - if: ${{ inputs.type == 'experimental' }} - with: - name: ios-build-experimental - path: ios/Rocket.Chat.ipa - - - name: Upload IPA artifact - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - if: ${{ inputs.type == 'official' }} with: name: ios-build-official path: ios/Rocket.Chat.ipa - name: Upload Rocket.Chat.app.dSYM.zip uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - if: ${{ inputs.type == 'experimental' }} - with: - name: ios-build-experimental-dSYM - path: ios/Rocket.Chat.app.dSYM.zip - - - name: Upload Rocket.Chat.app.dSYM.zip - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - if: ${{ inputs.type == 'official' }} with: name: ios-build-official-dSYM path: ios/Rocket.Chat.app.dSYM.zip - name: Upload RocketChatRN/Info.plist uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - if: ${{ inputs.type == 'experimental' }} - with: - name: ios-build-experimental-info-plist - path: ios/RocketChatRN/Info.plist - - - name: Upload RocketChatRN/Info.plist - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - if: ${{ inputs.type == 'official' }} with: name: ios-build-official-info-plist path: ios/RocketChatRN/Info.plist diff --git a/.github/actions/upload-android/action.yml b/.github/actions/upload-android/action.yml index 98e5f773250..c42d0259809 100644 --- a/.github/actions/upload-android/action.yml +++ b/.github/actions/upload-android/action.yml @@ -1,9 +1,6 @@ name: 'Upload Android' description: 'Downloads AAB + Manifest, uploads to Play Store' inputs: - type: - description: 'Build type: official or experimental' - required: true FASTLANE_GOOGLE_SERVICE_ACCOUNT: description: 'Google service account key for upload' required: true @@ -17,19 +14,11 @@ inputs: description: 'Trigger for build' required: true default: pr - + runs: using: "composite" steps: - - name: Download Experimental AAB - if: ${{ inputs.type == 'experimental' }} - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 - with: - name: android-aab-experimental - path: android/app/build/outputs/bundle/experimentalRelease/ - - name: Download Official AAB - if: ${{ inputs.type == 'official' }} uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 with: name: android-aab-official @@ -72,34 +61,24 @@ runs: working-directory: android run: | if [[ ${{ inputs.trigger }} == "pr" ]]; then - bundle exec fastlane android beta official:${{ inputs.type == 'official' }} + bundle exec fastlane android beta fi - if [[ ${{ inputs.trigger }} == "develop" ]] && [[ ${{ inputs.type }} == 'experimental' ]]; then - bundle exec fastlane android experimental_production - fi - if [[ ${{ inputs.trigger }} == "develop" ]] && [[ ${{ inputs.type }} == 'official' ]]; then + if [[ ${{ inputs.trigger }} == "develop" ]]; then bundle exec fastlane android official_open_testing fi shell: bash - + - name: Leave a comment on PR if: ${{ inputs.trigger == 'pr' }} env: GH_TOKEN: ${{ inputs.GITHUB_TOKEN }} PR_NUMBER: ${{ github.event.pull_request.number }} - BUILD_TYPE: ${{ inputs.type }} BUILD_VERSION: ${{ inputs.BUILD_VERSION }} run: | - if [[ "$BUILD_TYPE" == "official" ]]; then - app_name="Rocket.Chat" - else - app_name="Rocket.Chat Experimental" - fi - gradle_file="android/app/build.gradle" VERSION_NAME=$(grep versionName $gradle_file | head -n 1 | sed -E 's/.*versionName[[:space:]]+"([^"]+)".*/\1/') - version_info="$app_name $VERSION_NAME.$BUILD_VERSION" + version_info="Rocket.Chat $VERSION_NAME.$BUILD_VERSION" message="**Android Build Available**"$'\n\n'"$version_info" diff --git a/.github/actions/upload-internal-android/action.yml b/.github/actions/upload-internal-android/action.yml index d4c0c7b0ac6..a8ee1f4616d 100644 --- a/.github/actions/upload-internal-android/action.yml +++ b/.github/actions/upload-internal-android/action.yml @@ -1,9 +1,6 @@ name: 'Upload Android' description: 'Downloads AAB + Manifest, uploads to Play Store' inputs: - type: - description: 'Build type: official or experimental' - required: true FASTLANE_GOOGLE_SERVICE_ACCOUNT: description: 'Google service account key for upload' required: true @@ -21,15 +18,7 @@ inputs: runs: using: "composite" steps: - - name: Download Experimental AAB - if: ${{ inputs.type == 'experimental' }} - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 - with: - name: android-aab-experimental - path: android/app/build/outputs/bundle/experimentalRelease/ - - name: Download Official AAB - if: ${{ inputs.type == 'official' }} uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 with: name: android-aab-official @@ -52,7 +41,7 @@ runs: working-directory: android run: | set -o pipefail - output=$(bundle exec fastlane android internal_app_sharing official:${{ inputs.type == 'official' }} 2>&1 | sed -r "s/\x1B\[[0-9;]*[mK]//g") + output=$(bundle exec fastlane android internal_app_sharing 2>&1 | sed -r "s/\x1B\[[0-9;]*[mK]//g") echo "$output" @@ -78,7 +67,6 @@ runs: env: GH_TOKEN: ${{ inputs.GITHUB_TOKEN }} PR_NUMBER: ${{ github.event.pull_request.number }} - BUILD_TYPE: ${{ inputs.type }} BUILD_VERSION: ${{ inputs.BUILD_VERSION }} run: | if [[ -z "$INTERNAL_SHARING_URL" ]]; then @@ -86,13 +74,7 @@ runs: exit 1 fi - if [[ "$BUILD_TYPE" == "official" ]]; then - app_name="Rocket.Chat" - else - app_name="Rocket.Chat Experimental" - fi - - version_info="$app_name $VERSION_NAME.$BUILD_VERSION" + version_info="Rocket.Chat $VERSION_NAME.$BUILD_VERSION" message="**Android Build Available**"$'\n\n'"$version_info"$'\n\n'"Internal App Sharing: $INTERNAL_SHARING_URL" diff --git a/.github/actions/upload-ios/action.yml b/.github/actions/upload-ios/action.yml index 438995b8f64..0822a6bc315 100644 --- a/.github/actions/upload-ios/action.yml +++ b/.github/actions/upload-ios/action.yml @@ -1,9 +1,6 @@ name: 'Upload iOS' description: 'Downloads IPA, uploads to App Store' inputs: - type: - description: 'Build type: official or experimental' - required: true MATCH_KEYCHAIN_NAME: description: 'Match Keychain Name' required: true @@ -32,48 +29,24 @@ inputs: description: 'Trigger for build' required: false default: pr - + runs: using: "composite" steps: - name: Download iOS build uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 - if: ${{ inputs.type == 'experimental' }} - with: - name: ios-build-experimental - path: ios/ - - - name: Download iOS build - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 - if: ${{ inputs.type == 'official' }} with: name: ios-build-official path: ios/ - name: Download dSYM uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 - if: ${{ inputs.type == 'experimental' }} - with: - name: ios-build-experimental-dSYM - path: ios/ - - - name: Download dSYM - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 - if: ${{ inputs.type == 'official' }} with: name: ios-build-official-dSYM path: ios/ - name: Download Info.plist uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 - if: ${{ inputs.type == 'experimental' }} - with: - name: ios-build-experimental-info-plist - path: ios/RocketChatRN/ - - - name: Download Info.plist - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 - if: ${{ inputs.type == 'official' }} with: name: ios-build-official-info-plist path: ios/RocketChatRN/ @@ -110,7 +83,7 @@ runs: shell: bash - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 - if: ${{ inputs.type == 'official' && inputs.trigger == 'develop' }} + if: ${{ inputs.trigger == 'develop' }} with: name: release-changelog path: . @@ -118,14 +91,8 @@ runs: - name: Fastlane Submit to TestFlight working-directory: ios run: | - if [[ ${{ inputs.type }} == "official" ]]; then - echo "Submitting to TestFlight as Official" - bundle exec fastlane ios beta official:true - fi - if [[ ${{ inputs.type }} == "experimental" ]]; then - echo "Submitting to TestFlight as Experimental" - bundle exec fastlane ios beta official:false - fi + echo "Submitting to TestFlight as Official" + bundle exec fastlane ios beta env: MATCH_KEYCHAIN_NAME: ${{ inputs.MATCH_KEYCHAIN_NAME }} MATCH_KEYCHAIN_PASSWORD: ${{ inputs.MATCH_KEYCHAIN_PASSWORD }} @@ -152,15 +119,8 @@ runs: env: GH_TOKEN: ${{ inputs.GITHUB_TOKEN }} PR_NUMBER: ${{ github.event.pull_request.number }} - BUILD_TYPE: ${{ inputs.type }} run: | - if [[ "$BUILD_TYPE" == "official" ]]; then - app_name="Rocket.Chat" - else - app_name="Rocket.Chat Experimental" - fi - - message="**iOS Build Available**"$'\n\n'"$app_name $VERSION_NAME.$BUILD_VERSION" + message="**iOS Build Available**"$'\n\n'"Rocket.Chat $VERSION_NAME.$BUILD_VERSION" gh pr comment "$PR_NUMBER" --body "$message" shell: bash diff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.yml deleted file mode 100644 index dca846c0c36..00000000000 --- a/.github/workflows/build-android.yml +++ /dev/null @@ -1,108 +0,0 @@ -name: Build Android And Upload - -on: - workflow_call: - inputs: - type: - type: string - required: true - trigger: - type: string - required: false - default: pr - -jobs: - build-hold: - name: Hold - runs-on: ubuntu-latest - if: ${{ inputs.trigger == 'pr' }} - environment: experimental_android_build - steps: - - run: echo "Waiting for manual approval..." - - build-android: - name: Build - runs-on: ubuntu-latest - needs: [build-hold] - if: ${{ inputs.type == 'experimental' && (always() && (needs.build-hold.result == 'success' || needs.build-hold.result == 'skipped')) }} - outputs: - BUILD_VERSION: ${{ steps.version.outputs.BUILD_VERSION }} - steps: - - name: Checkout Repository - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - - - name: Checkout and Setup Node - uses: ./.github/actions/setup-node - - - name: Fetch supported versions from Cloud - uses: ./.github/actions/fetch-supported-versions - with: - build_name: 'android-experimental' - - - name: Generate Build Version - id: version - uses: ./.github/actions/generate-build-version - with: - RN_VARIABLES_PAT: ${{ secrets.RN_VARIABLES_PAT }} - - - name: Build Android - uses: ./.github/actions/build-android - timeout-minutes: 40 - with: - type: 'experimental' - BUGSNAG_KEY: ${{ secrets.BUGSNAG_KEY }} - KEYSTORE_EXPERIMENTAL_BASE64: ${{ secrets.KEYSTORE_EXPERIMENTAL_BASE64 }} - KEYSTORE_EXPERIMENTAL: ${{ secrets.KEYSTORE_EXPERIMENTAL }} - KEYSTORE_EXPERIMENTAL_PASSWORD: ${{ secrets.KEYSTORE_EXPERIMENTAL_PASSWORD }} - KEYSTORE_EXPERIMENTAL_ALIAS: ${{ secrets.KEYSTORE_EXPERIMENTAL_ALIAS }} - GOOGLE_SERVICES_ANDROID: ${{ secrets.GOOGLE_SERVICES_ANDROID }} - BUILD_VERSION: ${{ steps.version.outputs.BUILD_VERSION }} - - upload-hold: - name: Upload Hold - runs-on: ubuntu-latest - needs: [build-android] - if: ${{ inputs.trigger == 'pr' }} - environment: upload_experimental_android - outputs: - BUILD_VERSION: ${{ needs.build-android.outputs.BUILD_VERSION }} - steps: - - run: echo "Waiting for manual approval..." - - upload-android: - name: Upload - runs-on: ubuntu-latest - needs: [upload-hold, build-android] - if: ${{ inputs.type == 'experimental' && (always() && (needs.upload-hold.result == 'success' || needs.upload-hold.result == 'skipped') && needs.build-android.result == 'success') }} - steps: - - name: Checkout Repository - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - - - name: Upload Android - uses: ./.github/actions/upload-android - with: - type: experimental - trigger: ${{ inputs.trigger }} - FASTLANE_GOOGLE_SERVICE_ACCOUNT: ${{ secrets.FASTLANE_GOOGLE_SERVICE_ACCOUNT }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BUILD_VERSION: ${{ needs.upload-hold.outputs.BUILD_VERSION }} - - upload-internal: - name: Internal Sharing - runs-on: ubuntu-latest - needs: [build-android] - if: ${{ inputs.type == 'experimental' && inputs.trigger == 'pr' }} - steps: - - name: Checkout Repository - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - - - name: Checkout and Setup Node - uses: ./.github/actions/setup-node - - - name: Upload Internal Sharing - uses: ./.github/actions/upload-internal-android - with: - type: experimental - FASTLANE_GOOGLE_SERVICE_ACCOUNT: ${{ secrets.FASTLANE_GOOGLE_SERVICE_ACCOUNT }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BUILD_VERSION: ${{ needs.build-android.outputs.BUILD_VERSION }} diff --git a/.github/workflows/build-develop.yml b/.github/workflows/build-develop.yml index 5e9969daf74..43ae6c9dd0f 100644 --- a/.github/workflows/build-develop.yml +++ b/.github/workflows/build-develop.yml @@ -23,16 +23,6 @@ jobs: needs: [run-eslint-and-test] uses: ./.github/workflows/generate-changelog.yml - android-build-experimental-store: - name: Build Android Experimental - if: ${{ github.repository == 'RocketChat/Rocket.Chat.ReactNative' }} - uses: ./.github/workflows/build-android.yml - needs: [run-eslint-and-test, generate-changelog] - secrets: inherit - with: - type: experimental - trigger: develop - android-build-official-store: name: Build Android Official if: ${{ github.repository == 'RocketChat/Rocket.Chat.ReactNative' }} @@ -40,19 +30,8 @@ jobs: needs: [run-eslint-and-test, generate-changelog] secrets: inherit with: - type: official trigger: develop - ios-build-experimental-store: - name: Build iOS Experimental - if: ${{ github.repository == 'RocketChat/Rocket.Chat.ReactNative' }} - uses: ./.github/workflows/build-ios.yml - needs: [run-eslint-and-test, generate-changelog] - secrets: inherit - with: - type: experimental - trigger: develop - ios-build-official-store: name: Build iOS Official if: ${{ github.repository == 'RocketChat/Rocket.Chat.ReactNative' }} @@ -60,5 +39,4 @@ jobs: needs: [run-eslint-and-test, generate-changelog] secrets: inherit with: - type: official - trigger: develop \ No newline at end of file + trigger: develop diff --git a/.github/workflows/build-ios.yml b/.github/workflows/build-ios.yml deleted file mode 100644 index 52a0919a3d0..00000000000 --- a/.github/workflows/build-ios.yml +++ /dev/null @@ -1,87 +0,0 @@ -name: Build iOS And Upload - -on: - workflow_call: - inputs: - type: - type: string - required: true - trigger: - type: string - required: false - default: pr - -jobs: - build-hold: - name: Hold - runs-on: ubuntu-latest - if: ${{ inputs.trigger == 'pr' }} - environment: experimental_ios_build - steps: - - run: echo "Waiting for manual approval..." - - build-ios: - name: Build - runs-on: macos-26 - needs: [build-hold] - if: ${{ inputs.type == 'experimental' && (always() && (needs.build-hold.result == 'success' || needs.build-hold.result == 'skipped')) }} - steps: - - name: Checkout Repository - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - - - name: Checkout and Setup Node - uses: ./.github/actions/setup-node - - - name: Fetch supported versions from Cloud - uses: ./.github/actions/fetch-supported-versions - with: - build_name: 'ios-experimental' - - - name: Generate Build Version - id: version - uses: ./.github/actions/generate-build-version - with: - RN_VARIABLES_PAT: ${{ secrets.RN_VARIABLES_PAT }} - - - name: Build iOS - uses: ./.github/actions/build-ios - timeout-minutes: 60 - with: - type: experimental - MATCH_KEYCHAIN_NAME: ${{ secrets.MATCH_KEYCHAIN_NAME }} - MATCH_KEYCHAIN_PASSWORD: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }} - MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} - APP_STORE_CONNECT_API_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ID }} - APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }} - FASTLANE_REPO_PAT: ${{ secrets.FASTLANE_REPO_PAT }} - BUGSNAG_KEY: ${{ secrets.BUGSNAG_KEY }} - APP_STORE_CONNECT_API_KEY_BASE64: ${{ secrets.APP_STORE_CONNECT_API_KEY_BASE64 }} - GOOGLE_SERVICES_IOS: ${{ secrets.GOOGLE_SERVICES_IOS }} - GOOGLE_SERVICES_IOS_EXPERIMENTAL: ${{ secrets.GOOGLE_SERVICES_IOS_EXPERIMENTAL }} - BUILD_VERSION: ${{ steps.version.outputs.BUILD_VERSION }} - - upload-ios: - name: Upload - runs-on: macos-26 - needs: [build-ios] - if: ${{ inputs.type == 'experimental' && (always() && (needs.build-ios.result == 'success')) }} - steps: - - name: Checkout Repository - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - - - name: Setup Node - uses: ./.github/actions/setup-node - - - name: Upload iOS - uses: ./.github/actions/upload-ios - with: - type: experimental - trigger: ${{ inputs.trigger }} - MATCH_KEYCHAIN_NAME: ${{ secrets.MATCH_KEYCHAIN_NAME }} - MATCH_KEYCHAIN_PASSWORD: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }} - MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} - APP_STORE_CONNECT_API_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ID }} - APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }} - FASTLANE_REPO_PAT: ${{ secrets.FASTLANE_REPO_PAT }} - APP_STORE_CONNECT_API_KEY_BASE64: ${{ secrets.APP_STORE_CONNECT_API_KEY_BASE64 }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/build-official-android.yml b/.github/workflows/build-official-android.yml index e737ebd25e7..18d2bdf7fe8 100644 --- a/.github/workflows/build-official-android.yml +++ b/.github/workflows/build-official-android.yml @@ -3,9 +3,6 @@ name: Build Android And Upload on: workflow_call: inputs: - type: - type: string - required: true trigger: type: string required: false @@ -24,7 +21,7 @@ jobs: name: Build runs-on: ubuntu-latest needs: build-hold - if: ${{ inputs.type == 'official' && (always() && (needs.build-hold.result == 'success' || needs.build-hold.result == 'skipped')) }} + if: ${{ always() && (needs.build-hold.result == 'success' || needs.build-hold.result == 'skipped') }} outputs: BUILD_VERSION: ${{ steps.version.outputs.BUILD_VERSION }} steps: @@ -49,7 +46,6 @@ jobs: uses: ./.github/actions/build-android timeout-minutes: 40 with: - type: official GOOGLE_SERVICES_ANDROID: ${{ secrets.GOOGLE_SERVICES_ANDROID }} KEYSTORE_OFFICIAL_BASE64: ${{ secrets.KEYSTORE_OFFICIAL_BASE64 }} KEYSTORE_OFFICIAL: ${{ secrets.KEYSTORE_OFFICIAL }} @@ -73,36 +69,34 @@ jobs: name: Upload runs-on: ubuntu-latest needs: [build-android, upload-hold] - if: ${{ inputs.type == 'official' && (always() && (needs.upload-hold.result == 'success' || needs.upload-hold.result == 'skipped')) }} + if: ${{ always() && (needs.upload-hold.result == 'success' || needs.upload-hold.result == 'skipped') }} steps: - name: Checkout Repository uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - + - name: Upload Android uses: ./.github/actions/upload-android with: - type: official trigger: ${{ inputs.trigger }} FASTLANE_GOOGLE_SERVICE_ACCOUNT: ${{ secrets.FASTLANE_GOOGLE_SERVICE_ACCOUNT }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} BUILD_VERSION: ${{ needs.build-android.outputs.BUILD_VERSION }} - + upload-internal: name: Internal Sharing runs-on: ubuntu-latest needs: [build-android] - if: ${{ inputs.type == 'official' && inputs.trigger == 'pr' }} + if: ${{ inputs.trigger == 'pr' }} steps: - name: Checkout Repository uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - name: Checkout and Setup Node uses: ./.github/actions/setup-node - + - name: Upload Internal Sharing uses: ./.github/actions/upload-internal-android with: - type: official FASTLANE_GOOGLE_SERVICE_ACCOUNT: ${{ secrets.FASTLANE_GOOGLE_SERVICE_ACCOUNT }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} BUILD_VERSION: ${{ needs.build-android.outputs.BUILD_VERSION }} diff --git a/.github/workflows/build-official-ios.yml b/.github/workflows/build-official-ios.yml index 440011edddf..0e8e6538b8f 100644 --- a/.github/workflows/build-official-ios.yml +++ b/.github/workflows/build-official-ios.yml @@ -3,9 +3,6 @@ name: Build iOS And Upload on: workflow_call: inputs: - type: - type: string - required: true trigger: type: string required: false @@ -24,7 +21,7 @@ jobs: name: Build runs-on: macos-26 needs: [build-hold] - if: ${{ inputs.type == 'official' && (always() && (needs.build-hold.result == 'success' || needs.build-hold.result == 'skipped')) }} + if: ${{ always() && (needs.build-hold.result == 'success' || needs.build-hold.result == 'skipped') }} steps: - name: Checkout Repository uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 @@ -47,18 +44,15 @@ jobs: uses: ./.github/actions/build-ios timeout-minutes: 60 with: - type: official MATCH_KEYCHAIN_NAME: ${{ secrets.MATCH_KEYCHAIN_NAME }} MATCH_KEYCHAIN_PASSWORD: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }} MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} APP_STORE_CONNECT_API_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ID }} APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }} FASTLANE_REPO_PAT: ${{ secrets.FASTLANE_REPO_PAT }} - BUGSNAG_KEY: ${{ secrets.BUGSNAG_KEY_OFFICIAL }} BUGSNAG_KEY_OFFICIAL: ${{ secrets.BUGSNAG_KEY_OFFICIAL }} APP_STORE_CONNECT_API_KEY_BASE64: ${{ secrets.APP_STORE_CONNECT_API_KEY_BASE64 }} GOOGLE_SERVICES_IOS: ${{ secrets.GOOGLE_SERVICES_IOS }} - GOOGLE_SERVICES_IOS_EXPERIMENTAL: ${{ secrets.GOOGLE_SERVICES_IOS_EXPERIMENTAL }} BUILD_VERSION: ${{ steps.version.outputs.BUILD_VERSION }} upload-hold: @@ -74,7 +68,7 @@ jobs: name: Upload runs-on: macos-26 needs: [upload-hold] - if: ${{ inputs.type == 'official' && (always() && (needs.upload-hold.result == 'success' || needs.upload-hold.result == 'skipped')) }} + if: ${{ always() && (needs.upload-hold.result == 'success' || needs.upload-hold.result == 'skipped') }} steps: - name: Checkout Repository uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 @@ -85,7 +79,6 @@ jobs: - name: Upload iOS uses: ./.github/actions/upload-ios with: - type: official trigger: ${{ inputs.trigger }} MATCH_KEYCHAIN_NAME: ${{ secrets.MATCH_KEYCHAIN_NAME }} MATCH_KEYCHAIN_PASSWORD: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }} diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index a6ae4eed9d9..66648988794 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -19,16 +19,6 @@ jobs: if: ${{ github.repository == 'RocketChat/Rocket.Chat.ReactNative' }} uses: ./.github/workflows/eslint.yml - android-build-experimental-store: - name: Build Android Experimental - if: ${{ github.repository == 'RocketChat/Rocket.Chat.ReactNative' }} - uses: ./.github/workflows/build-android.yml - needs: [run-eslint-and-test] - secrets: inherit - with: - type: experimental - trigger: "pr" - android-build-official-store: name: Build Android Official if: ${{ github.repository == 'RocketChat/Rocket.Chat.ReactNative' }} @@ -36,19 +26,8 @@ jobs: needs: [run-eslint-and-test] secrets: inherit with: - type: official trigger: "pr" - ios-build-experimental-store: - name: Build iOS Experimental - if: ${{ github.repository == 'RocketChat/Rocket.Chat.ReactNative' }} - uses: ./.github/workflows/build-ios.yml - needs: [run-eslint-and-test] - secrets: inherit - with: - type: experimental - trigger: "pr" - ios-build-official-store: name: Build iOS Official if: ${{ github.repository == 'RocketChat/Rocket.Chat.ReactNative' }} @@ -56,7 +35,6 @@ jobs: needs: [run-eslint-and-test] secrets: inherit with: - type: official trigger: "pr" e2e-hold: @@ -66,7 +44,7 @@ jobs: runs-on: ubuntu-latest steps: - run: echo "Waiting for manual approval..." - + e2e-build-android: name: E2E Build Android if: ${{ github.repository == 'RocketChat/Rocket.Chat.ReactNative' }} @@ -86,14 +64,14 @@ jobs: fail-fast: false with: shard: ${{ matrix.shard }} - + e2e-build-ios: name: E2E Build iOS if: ${{ github.repository == 'RocketChat/Rocket.Chat.ReactNative' }} uses: ./.github/workflows/e2e-build-ios.yml needs: [e2e-hold] secrets: inherit - + e2e-run-ios: name: E2E Run iOS if: ${{ github.repository == 'RocketChat/Rocket.Chat.ReactNative' }} @@ -105,4 +83,4 @@ jobs: shard: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] fail-fast: false with: - shard: ${{ matrix.shard }} \ No newline at end of file + shard: ${{ matrix.shard }} diff --git a/android/fastlane/Fastfile b/android/fastlane/Fastfile index 1448a1173f0..6f754b3bc3f 100644 --- a/android/fastlane/Fastfile +++ b/android/fastlane/Fastfile @@ -33,43 +33,19 @@ platform :android do end desc "Upload App to Play Store Internal" - lane :beta do |options| - if options[:official] - upload_to_play_store( - package_name: 'chat.rocket.android', - track: 'internal', - aab: 'app/build/outputs/bundle/officialRelease/app-official-release.aab' - ) - else - upload_to_play_store( - package_name: 'chat.rocket.reactnative', - track: 'internal', - aab: 'app/build/outputs/bundle/experimentalRelease/app-experimental-release.aab' - ) - end + lane :beta do + upload_to_play_store( + package_name: 'chat.rocket.android', + track: 'internal', + aab: 'app/build/outputs/bundle/officialRelease/app-official-release.aab' + ) end desc "Upload App to Internal App Sharing" - lane :internal_app_sharing do |options| - if options[:official] - upload_to_play_store_internal_app_sharing( - package_name: 'chat.rocket.android', - aab: 'app/build/outputs/bundle/officialRelease/app-official-release.aab' - ) - else - upload_to_play_store_internal_app_sharing( - package_name: 'chat.rocket.reactnative', - aab: 'app/build/outputs/bundle/experimentalRelease/app-experimental-release.aab' - ) - end - end - - desc "Upload App to Play Store Production" - lane :experimental_production do - upload_to_play_store( - package_name: 'chat.rocket.reactnative', - track: 'production', - aab: 'app/build/outputs/bundle/experimentalRelease/app-experimental-release.aab' + lane :internal_app_sharing do + upload_to_play_store_internal_app_sharing( + package_name: 'chat.rocket.android', + aab: 'app/build/outputs/bundle/officialRelease/app-official-release.aab' ) end diff --git a/ios/fastlane/Fastfile b/ios/fastlane/Fastfile index e0dbcd852e7..14fa855bd82 100644 --- a/ios/fastlane/Fastfile +++ b/ios/fastlane/Fastfile @@ -17,18 +17,18 @@ default_platform :ios platform :ios do before_all do - setup_ci - create_keychain( - name: ENV["MATCH_KEYCHAIN_NAME"], - password: ENV["MATCH_KEYCHAIN_PASSWORD"], + setup_ci + create_keychain( + name: ENV["MATCH_KEYCHAIN_NAME"], + password: ENV["MATCH_KEYCHAIN_PASSWORD"], timeout: 0, lock_when_sleeps: false, unlock: true - ) + ) end desc "Submit a new Beta Build to Apple TestFlight" - lane :beta do |options| + lane :beta do changelog_path = File.expand_path('../../changelog.txt', __dir__) changelog = if File.exist?(changelog_path) @@ -45,12 +45,12 @@ platform :ios do pilot_options = { ipa: 'Rocket.Chat.ipa', - app_identifier: options[:official] ? 'chat.rocket.ios' : 'chat.rocket.reactnative', - skip_waiting_for_build_processing: !(options[:official] && changelog), + app_identifier: 'chat.rocket.ios', + skip_waiting_for_build_processing: !changelog, reject_build_waiting_for_review: true, } - if options[:official] && changelog + if changelog pilot_options[:changelog] = changelog pilot_options[:distribute_external] = true pilot_options[:notify_external_testers] = true @@ -62,32 +62,7 @@ platform :ios do upload_symbols_to_bugsnag( config_file: "RocketChatRN/Info.plist", dsym_path: "Rocket.Chat.app.dSYM.zip", - api_key: options[:official] ? ENV["BUGSNAG_KEY_OFFICIAL"] : ENV["BUGSNAG_KEY"] - ) - end - - desc "Build Experimental app" - lane :build_experimental do - api_key = app_store_connect_api_key( - key_id: ENV["APP_STORE_CONNECT_API_KEY_ID"], - issuer_id: ENV["APP_STORE_CONNECT_API_KEY_ISSUER_ID"], - key_filepath: 'fastlane/app_store_connect_api_key.p8', - in_house: false - ) - match(type: "appstore", platform: "ios") - get_provisioning_profile(app_identifier: "chat.rocket.reactnative.ShareExtension", platform: "ios") - get_provisioning_profile(app_identifier: "chat.rocket.reactnative.NotificationService", platform: "ios") - get_provisioning_profile(app_identifier: "chat.rocket.reactnative.watchkitapp", platform: "ios") - # pem(api_key: api_key) # still uses Spaceship http://docs.fastlane.tools/actions/pem/#how-does-it-work - # Allow codesign to access keys without prompting - keychain_path = "~/Library/Keychains/#{ENV['MATCH_KEYCHAIN_NAME']}-db" - sh "security unlock-keychain -p \"#{ENV['MATCH_KEYCHAIN_PASSWORD']}\" #{keychain_path}" - sh "security set-keychain-settings -lut 3600 #{keychain_path}" - sh "security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k \"#{ENV['MATCH_KEYCHAIN_PASSWORD']}\" #{keychain_path}" - gym( - scheme: "RocketChatRN", - workspace: "RocketChatRN.xcworkspace", - output_name: "Rocket.Chat" + api_key: ENV["BUGSNAG_KEY_OFFICIAL"] ) end @@ -143,21 +118,6 @@ platform :ios do gym(scheme: "RocketChatRN", workspace: "RocketChatRN.xcworkspace", skip_codesigning: true, skip_archive: true) end - desc "Build Experimental app for Simulator" - lane :build_experimental_simulator do - gym( - scheme: "RocketChatRN", - workspace: "RocketChatRN.xcworkspace", - destination: "generic/platform=iOS Simulator", - skip_package_ipa: true, - output_directory: "./fastlane/output", - build_path: "./fastlane/build", - configuration: "Release", - derived_data_path: "./fastlane/derived_data", - xcargs: "-parallelizeTargets -jobs 4 ARCHS=arm64" - ) - end - desc "Build Official app for Simulator" lane :build_official_simulator do sh "../../scripts/prepare_ios_official.sh" @@ -177,10 +137,10 @@ platform :ios do end after_all do |lane| - delete_keychain(name: ENV["MATCH_KEYCHAIN_NAME"]) - end + delete_keychain(name: ENV["MATCH_KEYCHAIN_NAME"]) + end error do |lane, exception| - delete_keychain(name: ENV["MATCH_KEYCHAIN_NAME"]) + delete_keychain(name: ENV["MATCH_KEYCHAIN_NAME"]) end end diff --git a/ios/fastlane/README.md b/ios/fastlane/README.md index 275f6ac1ec2..f93c95b627a 100644 --- a/ios/fastlane/README.md +++ b/ios/fastlane/README.md @@ -21,21 +21,21 @@ or alternatively using `brew install fastlane` fastlane ios beta ``` Submit a new Beta Build to Apple TestFlight -### ios release +### ios build_official ``` -fastlane ios release +fastlane ios build_official ``` -Build Experimental app +Build Official app ### ios build_fork ``` fastlane ios build_fork ``` Build fork app -### ios build_official +### ios build_official_simulator ``` -fastlane ios build_official +fastlane ios build_official_simulator ``` -Build Official app +Build Official app for Simulator ----