Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
a8bebfc
Patch for android
Rohit3523 Jul 17, 2025
5e0be0c
A big jump in offset...
Rohit3523 Jul 17, 2025
863fb05
Added 40 mins timeout in build
Rohit3523 Jul 17, 2025
07db5c7
Removing timeout
Rohit3523 Jul 17, 2025
ebdfd4c
Added timeout, please work...
Rohit3523 Jul 17, 2025
387d204
Remove the previous lint action to use a simgle one
Rohit3523 Jul 17, 2025
3f74fea
patch for ios circleci
Rohit3523 Jul 20, 2025
fe724ea
Android patch for circle ci
Rohit3523 Jul 20, 2025
a0967fd
Fast lane to upload in specific channel
Rohit3523 Jul 21, 2025
4a6d4cb
basic develop script
Rohit3523 Jul 21, 2025
2081578
Changes for releasing on prod
Rohit3523 Jul 22, 2025
4877423
Remove duplicate task...
Rohit3523 Jul 22, 2025
38dc655
Use setup node composite action in pretitter action too.. just to use…
Rohit3523 Jul 22, 2025
e16928a
Added beta for circle ci
Rohit3523 Jul 22, 2025
0188a67
Correct file path
Rohit3523 Jul 22, 2025
6f15f8e
refresh commit
Rohit3523 Jul 23, 2025
fa34fc6
revert
Rohit3523 Jul 23, 2025
cba7e3e
open testing is beta...
Rohit3523 Jul 23, 2025
12a1ee4
reser commit
Rohit3523 Jul 23, 2025
ec58b09
revert
Rohit3523 Jul 23, 2025
b76b36f
Changed push to develop
Rohit3523 Jul 23, 2025
4756fe0
Hold only for PR
Rohit3523 Jul 23, 2025
a7c50fc
env 2
Rohit3523 Jul 23, 2025
427106a
skip test
Rohit3523 Jul 23, 2025
3ee5606
correct label
Rohit3523 Jul 23, 2025
975a1a9
change
Rohit3523 Jul 23, 2025
2c972aa
Correct hold logic
Rohit3523 Jul 23, 2025
7f2abb7
conditional hold
Rohit3523 Jul 23, 2025
97db821
Get version code from store
Rohit3523 Jul 23, 2025
b90edc4
Correct ruby for android
Rohit3523 Jul 23, 2025
44acd0a
using bundle exec...
Rohit3523 Jul 23, 2025
1964094
remove play json file
Rohit3523 Jul 23, 2025
6ba1e45
use service_account...
Rohit3523 Jul 23, 2025
85f5332
Run only one action for build pr and develop and cancel old one
Rohit3523 Jul 23, 2025
f8938e3
added retry in android fastlane
Rohit3523 Jul 23, 2025
b0ab60f
let see if old action stop or not
Rohit3523 Jul 23, 2025
f8162d6
return highest number like ios, will add 1 in normal
Rohit3523 Jul 23, 2025
0a4fe1c
use xcode for ios
Rohit3523 Jul 23, 2025
c522cd2
removed concurrency temp
Rohit3523 Jul 23, 2025
c81e40e
ios env for app store
Rohit3523 Jul 23, 2025
4647caa
change to logic
Rohit3523 Jul 23, 2025
3426dfc
logic 2
Rohit3523 Jul 23, 2025
fbb6de8
Change logic
Rohit3523 Jul 23, 2025
dd1e0c9
upload android to Internal Sharing only in pull request runs
Rohit3523 Jul 23, 2025
78d66fb
Some changes
Rohit3523 Jul 24, 2025
982dea4
upload to internal testing
Rohit3523 Jul 24, 2025
17680cc
Removed develop run circleci scripts
Rohit3523 Jul 24, 2025
d66e0c4
Update Fastfile
Rohit3523 Jul 25, 2025
b57e09a
Update Fastfile
Rohit3523 Jul 25, 2025
1031e78
It's beta track but ui shows open testing...
Rohit3523 Jul 25, 2025
44534a9
Trigger on develop branch
Rohit3523 Jul 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 5 additions & 15 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ commands:
- run: *update-fastlane-android
- run:
name: Fastlane Play Store Upload
command: bundle exec fastlane android beta official:<< parameters.official >>
command: bundle exec fastlane android beta_circle_ci official:<< parameters.official >>
working_directory: android

# EXPERIMENTAL ONLY
Expand All @@ -314,7 +314,7 @@ commands:
- run: *update-fastlane-android
- run:
name: Fastlane Play Store Upload
command: bundle exec fastlane android internal_app_sharing
command: bundle exec fastlane android internal_app_sharing_circle_ci
working_directory: android

# EXPERIMENTAL ONLY
Expand All @@ -332,7 +332,7 @@ commands:
- run: *update-fastlane-android
- run:
name: Fastlane Play Store Upload
command: bundle exec fastlane android production
command: bundle exec fastlane android production_circle_ci
working_directory: android

upload-to-testflight:
Expand All @@ -354,7 +354,7 @@ commands:
name: Fastlane Tesflight Upload
command: |
echo $APP_STORE_CONNECT_API_KEY_BASE64 | base64 --decode > ./fastlane/app_store_connect_api_key.p8
bundle exec fastlane ios beta official:<< parameters.official >>
bundle exec fastlane ios beta_circle_ci official:<< parameters.official >>
working_directory: ios
- save_cache: *save-gems-cache

Expand Down Expand Up @@ -714,14 +714,4 @@ workflows:
requires:
- android-hold-google-play-beta-official

# Android Automatic Experimental
- android-automatic-build-experimental:
filters:
branches:
only:
- develop
requires:
- lint-testunit
- android-google-play-production-experimental:
requires:
- android-automatic-build-experimental

99 changes: 94 additions & 5 deletions .github/actions/generate-version-code/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,38 @@
name: Generate Version Code
description: Generates version code from GitHub run number

inputs:
official:
type: boolean
required: true
os:
type: string
required: true
FASTLANE_GOOGLE_SERVICE_ACCOUNT:
type: string
required: true
APP_STORE_CONNECT_API_KEY_BASE64:
type: string
required: true
MATCH_KEYCHAIN_NAME:
type: string
required: false
MATCH_KEYCHAIN_PASSWORD:
type: string
required: false
MATCH_PASSWORD:
type: string
required: false
APP_STORE_CONNECT_API_KEY_ID:
type: string
required: false
APP_STORE_CONNECT_API_KEY_ISSUER_ID:
type: string
required: false
FASTLANE_REPO_PAT:
type: string
required: false

outputs:
VERSIONCODE:
description: "Generated version code"
Expand All @@ -9,16 +41,73 @@ outputs:
runs:
using: "composite"
steps:
- name: Set up Xcode
if: ${{ inputs.os == 'ios' }}
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '16.2'

- name: Set up Ruby and Bundler
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.7
bundler-cache: true

- name: Install Fastlane
if: ${{ inputs.os == 'android' }}
working-directory: android
run: |
bundle install --path gems
shell: bash

- name: Store the Google service account key
if: ${{ inputs.os == 'android' }}
working-directory: android
run: |
echo "${{ inputs.FASTLANE_GOOGLE_SERVICE_ACCOUNT }}" | base64 --decode > service_account.json
shell: bash

- name: Decode p8
if: ${{ inputs.os == 'ios' }}
run: |
echo ${{ inputs.APP_STORE_CONNECT_API_KEY_BASE64 }} | base64 --decode > ./ios/fastlane/app_store_connect_api_key.p8
shell: bash

- name: Compute VERSIONCODE (iOS)
id: compute-versioncode-ios
if: ${{ inputs.os == 'ios' }}
shell: bash
run: |
VERSIONCODE=$(bundle exec fastlane ios get_testflight_version | grep 'VERSIONCODE=' | cut -d '=' -f2)
echo "LATEST_VERSIONCODE=$VERSIONCODE" >> $GITHUB_OUTPUT
working-directory: ios
env:
MATCH_KEYCHAIN_NAME: ${{ inputs.MATCH_KEYCHAIN_NAME }}
MATCH_KEYCHAIN_PASSWORD: ${{ inputs.MATCH_KEYCHAIN_PASSWORD }}
MATCH_PASSWORD: ${{ inputs.MATCH_PASSWORD }}
APP_STORE_CONNECT_API_KEY_ID: ${{ inputs.APP_STORE_CONNECT_API_KEY_ID }}
APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ inputs.APP_STORE_CONNECT_API_KEY_ISSUER_ID }}
FASTLANE_REPO_PAT: ${{ inputs.FASTLANE_REPO_PAT }}

- name: Compute VERSIONCODE (Android)
id: compute-versioncode-android
if: ${{ inputs.os == 'android' }}
shell: bash
run: |
VERSIONCODE=$(bundle exec fastlane android version_code | grep 'VERSIONCODE=' | cut -d '=' -f2)
echo "LATEST_VERSIONCODE=$VERSIONCODE" >> $GITHUB_OUTPUT
working-directory: android

- name: Compute VERSIONCODE
id: compute
shell: bash
env:
GITHUB_RUN_NUMBER: ${{ github.run_number }}
run: |
# This offset is from CircleCI after we migrated to Github Actions in order to have sequential builds
VERSION_IOS="${{ steps.compute-versioncode-ios.outputs.LATEST_VERSIONCODE }}"
VERSION_ANDROID="${{ steps.compute-versioncode-android.outputs.LATEST_VERSIONCODE }}"

OFFSET=87750
VERSIONCODE=$((OFFSET + GITHUB_RUN_NUMBER))
LATEST_VERSIONCODE="${VERSION_IOS:-$VERSION_ANDROID}"

VERSIONCODE=$((LATEST_VERSIONCODE + 1))
echo "VERSIONCODE=$VERSIONCODE" >> $GITHUB_OUTPUT

echo "### 📦 Version Code Generated" >> $GITHUB_STEP_SUMMARY
Expand Down
16 changes: 15 additions & 1 deletion .github/actions/upload-android/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ inputs:
VERSIONCODE:
description: 'Version code for build'
required: true
trigger:
description: 'Trigger for build'
required: true
default: pr

runs:
using: "composite"
Expand Down Expand Up @@ -52,10 +56,20 @@ runs:
- name: Fastlane Play Store Upload
working-directory: android
run: |
bundle exec fastlane android beta official:${{ inputs.type == 'official' }}
if [[ ${{ inputs.trigger }} == "pr" ]]; then
bundle exec fastlane android beta official:${{ inputs.type == 'official' }}
fi
if [[ ${{ inputs.trigger }} == "develop" ]] && [[ ${{ inputs.type }} == 'experimental' ]]; then
bundle exec fastlane android experimental_production
fi
if [[ ${{ inputs.trigger }} == "develop" ]] && [[ ${{ inputs.type }} == 'official' ]]; 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 }}
Expand Down
7 changes: 6 additions & 1 deletion .github/actions/upload-internal-android/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ inputs:
VERSIONCODE:
description: 'Version code for build'
required: true

trigger:
description: 'Trigger for build'
required: false
default: pr

runs:
using: "composite"
steps:
Expand Down Expand Up @@ -75,6 +79,7 @@ runs:
shell: bash

- name: Share Internal App Sharing Link
if: ${{ inputs.trigger == 'pr' }}
env:
GH_TOKEN: ${{ inputs.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
Expand Down
5 changes: 5 additions & 0 deletions .github/actions/upload-ios/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ inputs:
GITHUB_TOKEN:
description: 'GitHub token for commenting'
required: true
trigger:
description: 'Trigger for build'
required: false
default: pr

runs:
using: "composite"
Expand Down Expand Up @@ -138,6 +142,7 @@ runs:
shell: bash

- name: Comment on PR with TestFlight Info
if: ${{ inputs.trigger == 'pr' }}
env:
GH_TOKEN: ${{ inputs.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
Expand Down
22 changes: 17 additions & 5 deletions .github/workflows/build-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@ on:
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..."
Expand All @@ -19,7 +24,7 @@ jobs:
name: Build
runs-on: ubuntu-latest
needs: [build-hold]
if: ${{ inputs.type == 'experimental' }}
if: ${{ inputs.type == 'experimental' && (always() && (needs.build-hold.result == 'success' || needs.build-hold.result == 'skipped')) }}
outputs:
VERSIONCODE: ${{ steps.version.outputs.VERSIONCODE }}
steps:
Expand All @@ -32,9 +37,14 @@ jobs:
- name: Generate Version Code
id: version
uses: ./.github/actions/generate-version-code
with:
official: false
os: android
FASTLANE_GOOGLE_SERVICE_ACCOUNT: ${{ secrets.FASTLANE_GOOGLE_SERVICE_ACCOUNT }}

- name: Build Android
uses: ./.github/actions/build-android
timeout-minutes: 40
with:
type: 'experimental'
BUGSNAG_KEY: ${{ secrets.BUGSNAG_KEY }}
Expand All @@ -49,15 +59,16 @@ jobs:
name: Upload Hold
runs-on: ubuntu-latest
needs: [build-android]
if: ${{ inputs.trigger == 'pr' }}
environment: upload_experimental_android
steps:
- run: echo "Waiting for manual approval..."

upload-android:
name: Upload
runs-on: ubuntu-latest
needs: [upload-hold]
if: ${{ inputs.type == 'experimental' }}
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@v4
Expand All @@ -69,6 +80,7 @@ jobs:
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 }}
VERSIONCODE: ${{ needs.build-android.outputs.VERSIONCODE }}
Expand All @@ -77,7 +89,7 @@ jobs:
name: Internal Sharing
runs-on: ubuntu-latest
needs: [build-android]
if: ${{ inputs.type == 'experimental' }}
if: ${{ inputs.type == 'experimental' && inputs.trigger == 'pr' }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
Expand All @@ -91,4 +103,4 @@ jobs:
type: experimental
FASTLANE_GOOGLE_SERVICE_ACCOUNT: ${{ secrets.FASTLANE_GOOGLE_SERVICE_ACCOUNT }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSIONCODE: ${{ needs.build-android.outputs.VERSIONCODE }}
VERSIONCODE: ${{ needs.build-android.outputs.VERSIONCODE }}
55 changes: 55 additions & 0 deletions .github/workflows/build-develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Build Develop

permissions:
contents: read

on:
push:
branches:
- 'develop'

jobs:
run-eslint-and-test:
name: ESLint and Test
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: develop

android-build-official-store:
name: Build Android Official
if: ${{ github.repository == 'RocketChat/Rocket.Chat.ReactNative' }}
uses: ./.github/workflows/build-official-android.yml
needs: [run-eslint-and-test]
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]
secrets: inherit
with:
type: experimental
trigger: develop

ios-build-official-store:
name: Build iOS Official
if: ${{ github.repository == 'RocketChat/Rocket.Chat.ReactNative' }}
uses: ./.github/workflows/build-official-ios.yml
needs: [run-eslint-and-test]
secrets: inherit
with:
type: official
trigger: develop
Loading
Loading