Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
18 changes: 16 additions & 2 deletions .github/actions/upload-android/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,33 @@ runs:
echo "${{ inputs.FASTLANE_GOOGLE_SERVICE_ACCOUNT }}" | base64 --decode > service_account.json
shell: bash

- uses: actions/download-artifact@v4
with:
name: release-changelog
path: .

- name: Prepare Play Store changelog metadata
run: |
mkdir -p android/fastlane/metadata/android/en-US/changelogs

cp changelog.txt android/fastlane/metadata/android/en-US/changelogs/$BUILD_VERSION.txt
shell: bash
env:
BUILD_VERSION: ${{ inputs.BUILD_VERSION }}

- name: Fastlane Play Store Upload
working-directory: android
run: |
if [[ ${{ inputs.trigger }} == "pr" ]]; then
bundle exec fastlane android beta official:${{ inputs.type == 'official' }}
bundle exec fastlane android official_open_testing
# 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
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 @@ -109,6 +109,11 @@ runs:
yarn pod-install
shell: bash

- uses: actions/download-artifact@v4
with:
name: release-changelog
path: .

- name: Fastlane Submit to TestFlight
working-directory: ios
run: |
Expand Down
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 @@ -73,7 +73,7 @@ jobs:
name: Upload
runs-on: ubuntu-latest
needs: [upload-hold]
if: ${{ inputs.type == 'official' && (always() && (needs.upload-hold.result == 'success' || needs.upload-hold.result == 'skipped')) }}
if: ${{ inputs.type == 'official' && inputs.trigger == 'pr' }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
Expand All @@ -91,7 +91,7 @@ jobs:
name: Internal Sharing
runs-on: ubuntu-latest
needs: [build-android]
if: ${{ inputs.type == 'official' && inputs.trigger == 'pr' }}
if: ${{ inputs.type == 'official' && (always() && (needs.upload-hold.result == 'success' || needs.upload-hold.result == 'skipped')) }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,22 @@ on:
branches:
- '*'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
run-eslint-and-test:
name: ESLint and Test
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 @@ -33,7 +34,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 @@ -43,7 +44,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 @@ -53,7 +54,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
32 changes: 32 additions & 0 deletions .github/workflows/generate-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
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" > changelog.txt

if [ ! -s changelog.txt ]; then
echo "- Improvements and bug fixes" > changelog.txt
fi

- name: Upload changelog artifact
uses: actions/upload-artifact@v4
with:
name: release-changelog
path: changelog.txt
14 changes: 13 additions & 1 deletion android/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,22 @@ platform :android do

desc "Upload App to Play Store Open Testing"
lane :official_open_testing do
changelog_path = File.expand_path('../../changelog.txt', __dir__)

changelog = if File.exist?(changelog_path)
File.read(changelog_path)
else
"Internal improvements and bug fixes"
end

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
11 changes: 10 additions & 1 deletion ios/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ 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)
File.read(changelog_path)
else
"Improvements and bug fixes"
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"],
Expand All @@ -38,7 +46,8 @@ platform :ios do
pilot(
ipa: 'Rocket.Chat.ipa',
app_identifier: options[:official] ? 'chat.rocket.ios' : 'chat.rocket.reactnative',
skip_waiting_for_build_processing: true
skip_waiting_for_build_processing: true,
changelog: changelog
)
upload_symbols_to_crashlytics(dsym_path: "Rocket.Chat.app.dSYM.zip")
upload_symbols_to_bugsnag(
Expand Down
Loading