Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
7038b2c
Generate changelog from commit and include it in beta release
Rohit3523 Jan 8, 2026
8e7f268
Temporary reverse the condition
Rohit3523 Jan 8, 2026
1beeb24
fix
Rohit3523 Jan 8, 2026
0ad4ab6
single action to generate changelog
Rohit3523 Jan 8, 2026
54f2427
Fix for changelog generator
Rohit3523 Jan 8, 2026
1dbe63d
fix changelog upload
Rohit3523 Jan 8, 2026
8b4f098
Added gh token env
Rohit3523 Jan 8, 2026
89b447a
use last tag instead of release
Rohit3523 Jan 8, 2026
b93c791
fix order
Rohit3523 Jan 8, 2026
c091dae
Merge branch 'develop' into beta-changelog
Rohit3523 Jan 10, 2026
e900697
Remove changelog from android fastlane
Rohit3523 Jan 10, 2026
8427d61
Added no merge
Rohit3523 Jan 10, 2026
ae13fac
Handle changelog character limit
Rohit3523 Jan 10, 2026
41508cf
reject previous bulid if it is in review
Rohit3523 Jan 10, 2026
97af463
Distribute to external group
Rohit3523 Jan 12, 2026
74c6f64
Revert testing changes
Rohit3523 Jan 12, 2026
3730528
For now run build-develop on beta-changelog push
Rohit3523 Jan 12, 2026
87cf200
Revert one more change
Rohit3523 Jan 12, 2026
2786906
echo version
Rohit3523 Jan 12, 2026
e9a11dd
use Build version based on condition
Rohit3523 Jan 12, 2026
381f35a
Remove echo version
Rohit3523 Jan 12, 2026
a5f7814
Some changes
Rohit3523 Jan 12, 2026
5ce95ac
added condition in ios experimental build
Rohit3523 Jan 12, 2026
2da31d9
Moved zome more option to conditional
Rohit3523 Jan 12, 2026
4461b9f
Update condition for downloading artifact
Rohit3523 Jan 13, 2026
6afe1de
wait for build process
Rohit3523 Jan 13, 2026
391ea9e
more improve
Rohit3523 Jan 13, 2026
eaf9c69
Run the action on develop push
Rohit3523 Jan 13, 2026
fa430f6
Added 15 retention days for changelog file
Rohit3523 Jan 13, 2026
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
28 changes: 27 additions & 1 deletion .github/actions/upload-android/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,33 @@ runs:
echo "${{ inputs.FASTLANE_GOOGLE_SERVICE_ACCOUNT }}" | base64 --decode > service_account.json
shell: bash

- uses: actions/download-artifact@v4
if: ${{ inputs.trigger == 'develop' }}
with:
name: release-changelog
path: .

- name: Prepare Play Store changelog metadata
if: ${{ inputs.trigger == 'develop' }}
run: |
mkdir -p android/fastlane/metadata/android/en-US/changelogs

if [ -f changelog.txt ]; then
size=$(wc -c < changelog.txt)

if [ "$size" -gt 500 ]; then
head -c 497 changelog.txt > android/fastlane/metadata/android/en-US/changelogs/$BUILD_VERSION.txt
printf "..." >> android/fastlane/metadata/android/en-US/changelogs/$BUILD_VERSION.txt
else
cat changelog.txt > android/fastlane/metadata/android/en-US/changelogs/$BUILD_VERSION.txt
fi
else
printf "Internal improvements and bug fixes" > android/fastlane/metadata/android/en-US/changelogs/$BUILD_VERSION.txt
fi
shell: bash
env:
BUILD_VERSION: ${{ inputs.BUILD_VERSION }}
Comment on lines +62 to +81
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

UTF-8 truncation may produce invalid characters; variables should be quoted.

Two issues:

  1. Byte vs character mismatch: Play Store limit is 500 characters, but wc -c counts bytes and head -c truncates at byte boundaries. For multi-byte UTF-8 characters (e.g., emojis, accented letters), this could:

    • Truncate mid-character, producing invalid UTF-8
    • Under-count actual characters, leaving room unused
  2. Unquoted variables: $BUILD_VERSION should be quoted to handle unexpected characters safely.

🔧 Proposed fix with character-based truncation
     - name: Prepare Play Store changelog metadata
       if: ${{ inputs.trigger == 'develop' }}
       run: |
         mkdir -p android/fastlane/metadata/android/en-US/changelogs

         if [ -f changelog.txt ]; then
-          size=$(wc -c < changelog.txt)
+          # Count characters, not bytes (for UTF-8 safety)
+          char_count=$(wc -m < changelog.txt)

-          if [ "$size" -gt 500 ]; then
-            head -c 497 changelog.txt > android/fastlane/metadata/android/en-US/changelogs/$BUILD_VERSION.txt
-            printf "..." >> android/fastlane/metadata/android/en-US/changelogs/$BUILD_VERSION.txt
+          if [ "$char_count" -gt 500 ]; then
+            # Truncate by characters to avoid breaking UTF-8
+            cut -c1-497 changelog.txt > "android/fastlane/metadata/android/en-US/changelogs/${BUILD_VERSION}.txt"
+            printf "..." >> "android/fastlane/metadata/android/en-US/changelogs/${BUILD_VERSION}.txt"
           else
-            cat changelog.txt > android/fastlane/metadata/android/en-US/changelogs/$BUILD_VERSION.txt
+            cat changelog.txt > "android/fastlane/metadata/android/en-US/changelogs/${BUILD_VERSION}.txt"
           fi
         else
-          printf "Internal improvements and bug fixes" > android/fastlane/metadata/android/en-US/changelogs/$BUILD_VERSION.txt
+          printf "Internal improvements and bug fixes" > "android/fastlane/metadata/android/en-US/changelogs/${BUILD_VERSION}.txt"
         fi
       shell: bash
       env:
         BUILD_VERSION: ${{ inputs.BUILD_VERSION }}
🤖 Prompt for AI Agents
In @.github/actions/upload-android/action.yml around lines 62 - 81, The
changelog handling uses byte-based wc -c/head -c and unquoted $BUILD_VERSION
which can break UTF-8 and fail for names with spaces; update the script to
perform character-based truncation (e.g., use a UTF-8 aware tool such as
awk/printf or a short python/perl one-liner to take the first 500 characters and
append "..." only when truncated) instead of wc -c/head -c, and always quote
variables and paths (use "$BUILD_VERSION", quote file expansions like
"android/fastlane/metadata/android/en-US/changelogs/$BUILD_VERSION.txt" and
"changelog.txt") so multi-byte characters remain valid and filenames with
special characters are safe.


- name: Fastlane Play Store Upload
working-directory: android
run: |
Expand All @@ -65,7 +92,6 @@ runs:
if [[ ${{ inputs.trigger }} == "develop" ]] && [[ ${{ inputs.type }} == 'official' ]]; then
bundle exec fastlane android official_open_testing
fi

shell: bash

- name: Leave a comment on PR
Expand Down
8 changes: 7 additions & 1 deletion .github/actions/upload-ios/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ runs:
yarn pod-install
shell: bash

- uses: actions/download-artifact@v4
if: ${{ inputs.type == 'official' && inputs.trigger == 'develop' }}
with:
name: release-changelog
path: .

- name: Fastlane Submit to TestFlight
working-directory: ios
run: |
Expand Down Expand Up @@ -157,4 +163,4 @@ runs:
message="**iOS Build Available**"$'\n\n'"$app_name $VERSION_NAME.$BUILD_VERSION"

gh pr comment "$PR_NUMBER" --body "$message"
shell: bash
shell: bash
13 changes: 9 additions & 4 deletions .github/workflows/build-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,16 @@ jobs:
if: ${{ github.repository == 'RocketChat/Rocket.Chat.ReactNative' }}
uses: ./.github/workflows/eslint.yml

generate-changelog:
name: Generate Release Changelog
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]
needs: [run-eslint-and-test, generate-changelog]
secrets: inherit
with:
type: experimental
Expand All @@ -28,7 +33,7 @@ jobs:
name: Build Android Official
if: ${{ github.repository == 'RocketChat/Rocket.Chat.ReactNative' }}
uses: ./.github/workflows/build-official-android.yml
needs: [run-eslint-and-test]
needs: [run-eslint-and-test, generate-changelog]
secrets: inherit
with:
type: official
Expand All @@ -38,7 +43,7 @@ jobs:
name: Build iOS Experimental
if: ${{ github.repository == 'RocketChat/Rocket.Chat.ReactNative' }}
uses: ./.github/workflows/build-ios.yml
needs: [run-eslint-and-test]
needs: [run-eslint-and-test, generate-changelog]
secrets: inherit
with:
type: experimental
Expand All @@ -48,7 +53,7 @@ jobs:
name: Build iOS Official
if: ${{ github.repository == 'RocketChat/Rocket.Chat.ReactNative' }}
uses: ./.github/workflows/build-official-ios.yml
needs: [run-eslint-and-test]
needs: [run-eslint-and-test, generate-changelog]
secrets: inherit
with:
type: official
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-official-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
upload-android:
name: Upload
runs-on: ubuntu-latest
needs: [upload-hold]
needs: [build-android, upload-hold]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change has been made, so I can access BUILD_VERSION from the build-android step

if: ${{ inputs.type == 'official' && (always() && (needs.upload-hold.result == 'success' || needs.upload-hold.result == 'skipped')) }}
steps:
- name: Checkout Repository
Expand All @@ -85,7 +85,7 @@ jobs:
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 }}
BUILD_VERSION: ${{ needs.build-android.outputs.BUILD_VERSION }}

upload-internal:
name: Internal Sharing
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/generate-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Generate Release Changelog

on:
workflow_call:

jobs:
generate-changelog:
name: Generate changelog
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Generate changelog
shell: bash
run: |
LATEST_RELEASE_TAG=$(git tag --sort=-creatordate | head -n 1)
git log "$LATEST_RELEASE_TAG"..HEAD --pretty=format:"- %s" --no-merges > changelog.txt
if [ ! -s changelog.txt ]; then
echo "- Improvements and bug fixes" > changelog.txt
fi
Comment on lines +17 to +26
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Handle the case when no tags exist in the repository.

If the repository has no tags, LATEST_RELEASE_TAG will be empty, causing git log ""..HEAD to output the entire commit history, which could be unexpectedly large. Consider adding a guard:

Proposed fix
         run: |
           LATEST_RELEASE_TAG=$(git tag --sort=-creatordate | head -n 1)
 
+          if [ -z "$LATEST_RELEASE_TAG" ]; then
+            echo "- Improvements and bug fixes" > changelog.txt
+            exit 0
+          fi
+
           git log "$LATEST_RELEASE_TAG"..HEAD --pretty=format:"- %s" --no-merges > changelog.txt
 
           if [ ! -s changelog.txt ]; then
             echo "- Improvements and bug fixes" > changelog.txt
           fi
🤖 Prompt for AI Agents
In @.github/workflows/generate-changelog.yml around lines 17 - 26, The workflow
currently sets LATEST_RELEASE_TAG and always runs git log
"$LATEST_RELEASE_TAG"..HEAD which expands to an empty range when there are no
tags; modify the "Generate changelog" step to check if LATEST_RELEASE_TAG is
empty and use a different git-log invocation in that case (e.g., git log
--pretty=format:"- %s" --no-merges HEAD > changelog.txt), otherwise keep the
existing git log "$LATEST_RELEASE_TAG"..HEAD > changelog.txt; ensure the guard
uses the LATEST_RELEASE_TAG variable and still writes a fallback "- Improvements
and bug fixes" to changelog.txt if the resulting file is empty.

- name: Upload changelog artifact
uses: actions/upload-artifact@v4
with:
name: release-changelog
path: changelog.txt
retention-days: 15
6 changes: 5 additions & 1 deletion android/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ platform :android do
upload_to_play_store(
package_name: 'chat.rocket.android',
track: 'beta',
aab: 'app/build/outputs/bundle/officialRelease/app-official-release.aab'
aab: 'app/build/outputs/bundle/officialRelease/app-official-release.aab',
skip_upload_metadata: true,
skip_upload_changelogs: false,
skip_upload_images: true,
skip_upload_screenshots: true
)
end
end
28 changes: 23 additions & 5 deletions ios/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,35 @@ platform :ios do

desc "Submit a new Beta Build to Apple TestFlight"
lane :beta do |options|
changelog_path = File.expand_path('../../changelog.txt', __dir__)

changelog = if File.exist?(changelog_path)
content = File.read(changelog_path)
content.length > 4000 ? content[0, 3997] + "..." : content
end

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
)
pilot(
ipa: 'Rocket.Chat.ipa',
app_identifier: options[:official] ? 'chat.rocket.ios' : 'chat.rocket.reactnative',
skip_waiting_for_build_processing: true
)

pilot_options = {
ipa: 'Rocket.Chat.ipa',
app_identifier: options[:official] ? 'chat.rocket.ios' : 'chat.rocket.reactnative',
skip_waiting_for_build_processing: !(options[:official] && changelog),
reject_build_waiting_for_review: true,
}

if options[:official] && changelog
pilot_options[:changelog] = changelog
pilot_options[:distribute_external] = true
pilot_options[:notify_external_testers] = true
pilot_options[:groups] = ["External Testers"]
end

pilot(pilot_options)
upload_symbols_to_crashlytics(dsym_path: "Rocket.Chat.app.dSYM.zip")
upload_symbols_to_bugsnag(
config_file: "RocketChatRN/Info.plist",
Expand Down
Loading