Skip to content
Open
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
63 changes: 46 additions & 17 deletions .github/workflows/build-ios-release-pullrequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ on:
push:
branches:
- master
- 2025-12-03-redwallet

pull_request:
types: [opened, reopened, synchronize, labeled]
branches:
- master
- 2025-12-03-redwallet
workflow_dispatch:

jobs:
Expand All @@ -30,18 +33,6 @@ jobs:
with:
fetch-depth: 0 # Ensures the full Git history is

- name: Ensure Correct Branch
if: github.ref != 'refs/heads/master'
run: |
if [ -n "${GITHUB_HEAD_REF}" ]; then
git fetch origin ${GITHUB_HEAD_REF}:${GITHUB_HEAD_REF}
git checkout ${GITHUB_HEAD_REF}
else
git fetch origin ${GITHUB_REF##*/}:${GITHUB_REF##*/}
git checkout ${GITHUB_REF##*/}
fi
echo "Checked out branch: $(git rev-parse --abbrev-ref HEAD)"

- name: Get Latest Commit Details
id: get_latest_commit_details
run: |
Expand Down Expand Up @@ -268,18 +259,21 @@ jobs:
working-directory: ios

- name: Set Up Git Authentication
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/2025-12-03-redwallet'
env:
ACCESS_TOKEN: ${{ secrets.GIT_ACCESS_TOKEN }}
run: |
git config --global credential.helper 'cache --timeout=3600'
git config --global http.https://github.com/.extraheader "AUTHORIZATION: basic $(echo -n x-access-token:${ACCESS_TOKEN} | base64)"

- name: Create Temporary Keychain
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/2025-12-03-redwallet'
run: bundle exec fastlane ios create_temp_keychain
env:
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}

- name: Setup Provisioning Profiles
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/2025-12-03-redwallet'
env:
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
GIT_ACCESS_TOKEN: ${{ secrets.GIT_ACCESS_TOKEN }}
Expand All @@ -290,7 +284,40 @@ jobs:
run: |
bundle exec fastlane ios setup_provisioning_profiles

- name: Build App (unsigned, non-master)
if: github.ref != 'refs/heads/master' && github.ref != 'refs/heads/2025-12-03-redwallet'
run: |
cd ios && pod install
mkdir -p build_logs
xcodebuild -workspace BlueWallet.xcworkspace \
-scheme BlueWallet \
-configuration Release \
-sdk iphonesimulator \
-destination 'generic/platform=iOS Simulator' \
-derivedDataPath build \
CODE_SIGNING_ALLOWED=NO \
build 2>&1 | tee build_logs/xcodebuild.log

- name: Upload unsigned app as artifact
if: github.ref != 'refs/heads/master' && github.ref != 'refs/heads/2025-12-03-redwallet'
uses: actions/upload-artifact@v4
with:
name: BlueWallet-unsigned-simulator
path: ios/build/Build/Products/Release-iphonesimulator/BlueWallet.app
retention-days: 7
if-no-files-found: error

- name: Upload build logs (non-master)
if: always() && github.ref != 'refs/heads/master' && github.ref != 'refs/heads/2025-12-03-redwallet'
uses: actions/upload-artifact@v4
with:
name: build_logs
path: ios/build_logs/xcodebuild.log
retention-days: 7
if-no-files-found: error

- name: Build App
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/2025-12-03-redwallet'
id: build_app
run: |
echo -e "\033[1;34m==================== BUILD APP DEBUG ====================\033[0m"
Expand Down Expand Up @@ -420,7 +447,7 @@ jobs:
echo -e "\033[1;31m========================================================\033[0m"

- name: Upload Bugsnag Sourcemaps
if: success()
if: success() && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/2025-12-03-redwallet')
run: bundle exec fastlane ios upload_bugsnag_sourcemaps
env:
BUGSNAG_API_KEY: ${{ secrets.BUGSNAG_API_KEY }}
Expand All @@ -429,14 +456,16 @@ jobs:
NEW_BUILD_NUMBER: ${{ env.NEW_BUILD_NUMBER }}

- name: Upload Build Logs
if: always()
if: always() && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/2025-12-03-redwallet')
uses: actions/upload-artifact@v4
with:
name: build_logs
path: ./ios/build_logs/
retention-days: 7
if-no-files-found: error

- name: Verify IPA File Before Upload
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/2025-12-03-redwallet'
run: |
echo "Checking IPA file at: $IPA_OUTPUT_PATH"
if [ -f "$IPA_OUTPUT_PATH" ]; then
Expand All @@ -450,21 +479,21 @@ jobs:
fi

- name: Upload IPA as Artifact
if: success()
if: success() && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/2025-12-03-redwallet')
uses: actions/upload-artifact@v4
with:
name: BlueWallet_IPA
path: ${{ env.IPA_OUTPUT_PATH }}
retention-days: 7

- name: Delete Temporary Keychain
if: always()
if: always() && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/2025-12-03-redwallet')
run: bundle exec fastlane ios delete_temp_keychain

testflight-upload:
needs: build
runs-on: macos-latest
if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'testflight')
if: (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/2025-12-03-redwallet')) || contains(github.event.pull_request.labels.*.name, 'testflight')
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
NEW_BUILD_NUMBER: ${{ needs.build.outputs.new_build_number }}
Expand Down
87 changes: 65 additions & 22 deletions .github/workflows/build-release-apk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ on:
pull_request:
branches:
- master
- 2025-12-03-redwallet
types: [opened, synchronize, reopened, labeled, unlabeled]
push:
branches:
- master
- 2025-12-03-redwallet

jobs:
buildReleaseApk:
Expand Down Expand Up @@ -57,40 +59,47 @@ jobs:
echo "NEW_BUILD_NUMBER=$NEW_BUILD_NUMBER" >> $GITHUB_ENV

- name: Prepare Keystore
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/2025-12-03-redwallet'
run: bundle exec fastlane android prepare_keystore
env:
KEYSTORE_FILE_HEX: ${{ secrets.KEYSTORE_FILE_HEX }}

- name: Update Version Code, Build, and Sign APK
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/2025-12-03-redwallet'
id: build_and_sign_apk
run: |
bundle exec fastlane android update_version_build_and_sign_apk
env:
BUILD_NUMBER: ${{ env.NEW_BUILD_NUMBER }}
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}

- name: Determine APK Filename and Path
id: determine_apk_path
- name: Build Debug APK (non-master branches)
if: github.ref != 'refs/heads/master' && github.ref != 'refs/heads/2025-12-03-redwallet'
run: |
cd android && ./gradlew assembleDebug --no-daemon

- name: Determine AAB Filename and Path (master)
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/2025-12-03-redwallet'
run: |
VERSION_NAME=$(grep versionName android/app/build.gradle | awk '{print $2}' | tr -d '"')
BRANCH_NAME=${GITHUB_HEAD_REF:-${GITHUB_REF_NAME}}
BRANCH_NAME=$(echo "$BRANCH_NAME" | sed 's/[^a-zA-Z0-9_-]/_/g')

if [ -n "$BRANCH_NAME" ] && [ "$BRANCH_NAME" != "master" ]; then
EXPECTED_FILENAME="BlueWallet-${VERSION_NAME}-${NEW_BUILD_NUMBER}-${BRANCH_NAME}.apk"
else
EXPECTED_FILENAME="BlueWallet-${VERSION_NAME}-${NEW_BUILD_NUMBER}.apk"
fi

APK_PATH="android/app/build/outputs/apk/release/${EXPECTED_FILENAME}"
echo "EXPECTED_FILENAME=${EXPECTED_FILENAME}" >> $GITHUB_ENV
echo "APK_PATH=${APK_PATH}" >> $GITHUB_ENV

- name: Upload APK as artifact
EXPECTED_FILENAME="BlueWallet-${VERSION_NAME}-${NEW_BUILD_NUMBER}.aab"
AAB_PATH="android/app/build/outputs/bundle/release/${EXPECTED_FILENAME}"
echo "AAB_PATH=${AAB_PATH}" >> $GITHUB_ENV

- name: Upload signed AAB as artifact
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/2025-12-03-redwallet'
uses: actions/upload-artifact@v4
with:
name: signed-aab
path: ${{ env.AAB_PATH }}
if-no-files-found: error

- name: Upload debug APK as artifact
if: github.ref != 'refs/heads/master' && github.ref != 'refs/heads/2025-12-03-redwallet'
uses: actions/upload-artifact@v4
with:
name: signed-apk
path: ${{ env.APK_PATH }}
name: debug-apk
path: android/app/build/outputs/apk/debug/app-debug.apk
if-no-files-found: error

browserstack:
Expand All @@ -111,14 +120,14 @@ jobs:
- name: Install dependencies with Bundler
run: bundle install --jobs 4 --retry 3

- name: Download APK artifact
- name: Download AAB artifact
uses: actions/download-artifact@v4
with:
name: signed-apk
name: signed-aab

- name: Set APK Path
run: |
APK_PATH=$(find ${{ github.workspace }} -name '*.apk')
APK_PATH=$(find ${{ github.workspace }} -name '*.aab')
echo "APK_PATH=$APK_PATH" >> $GITHUB_ENV

- name: Upload APK to BrowserStack and Post PR Comment
Expand All @@ -127,4 +136,38 @@ jobs:
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: bundle exec fastlane upload_to_browserstack_and_comment
run: bundle exec fastlane upload_to_browserstack_and_comment

play-store-upload:
runs-on: ubuntu-latest
needs: buildReleaseApk
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/2025-12-03-redwallet')

steps:
- name: Checkout code
uses: actions/checkout@v4

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

- name: Install dependencies with Bundler
run: bundle install --jobs 4 --retry 3

- name: Download AAB artifact
uses: actions/download-artifact@v4
with:
name: signed-aab

- name: Set AAB Path
run: |
AAB_PATH=$(find ${{ github.workspace }} -name '*.aab')
echo "AAB_PATH=$AAB_PATH" >> $GITHUB_ENV

- name: Upload to Google Play Internal Testing
env:
GOOGLE_PLAY_JSON_KEY: ${{ secrets.GOOGLE_PLAY_JSON_KEY }}
AAB_PATH: ${{ env.AAB_PATH }}
run: bundle exec fastlane android deploy_to_play_store
19 changes: 17 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ android {

namespace "io.bluewallet.bluewallet"
defaultConfig {
applicationId "io.bluewallet.bluewallet"
applicationId "com.layertwolabs.bluewallet"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionCode System.getenv("BUILD_NUMBER")?.toInteger() ?: (int)(System.currentTimeMillis() / 1000)
versionName "7.2.1"
testBuildType System.getProperty('testBuildType', 'debug')
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
Expand All @@ -103,13 +103,28 @@ android {
}
}

signingConfigs {
release {
def keystoreFile = file("${rootProject.projectDir}/../bluewallet-release-key.keystore")
if (keystoreFile.exists()) {
storeFile keystoreFile
storePassword System.getenv("KEYSTORE_PASSWORD") ?: ""
keyAlias "l2l dev"
keyPassword System.getenv("KEYSTORE_PASSWORD") ?: ""
}
}
}

buildTypes {
release {
// Caution! In production, you need to generate your own keystore file.
// see https://reactnative.dev/docs/signed-apk-android.
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
proguardFile "${rootProject.projectDir}/../node_modules/detox/android/detox/proguard-rules-app.pro"
if (signingConfigs.release.storeFile != null && signingConfigs.release.storeFile.exists()) {
signingConfig signingConfigs.release
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion android/app/google-services.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"client_info": {
"mobilesdk_app_id": "1:993804676679:android:3e611cf30d58bac8b5cb62",
"android_client_info": {
"package_name": "io.bluewallet.bluewallet"
"package_name": "com.layertwolabs.bluewallet"
}
},
"oauth_client": [
Expand Down
4 changes: 2 additions & 2 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

<meta-data
android:name="com.dieam.reactnativepushnotification.notification_channel_name"
android:value="BlueWallet notifications" />
android:value="RedWallet notifications" />
<meta-data
android:name="com.dieam.reactnativepushnotification.notification_channel_description"
android:value="Notifications about incoming payments" />
Expand Down Expand Up @@ -121,7 +121,7 @@
<!-- Settings Activity alias for System Settings -->
<activity-alias
android:name=".SettingsActivityAlias"
android:label="BlueWallet Settings"
android:label="RedWallet Settings"
android:exported="true"
android:targetActivity=".SettingsActivity">
<intent-filter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class BitcoinPriceWidget : AppWidgetProvider() {

companion object {
private const val TAG = "BitcoinPriceWidget"
private const val SHARED_PREF_NAME = "group.io.bluewallet.bluewallet"
private const val SHARED_PREF_NAME = "group.com.layertwolabs.bluewallet"

fun updateNetworkStatus(context: Context, appWidgetIds: IntArray) {
val isNetworkAvailable = NetworkUtils.isNetworkAvailable(context)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class MainActivity : ReactActivity() {
* This is used to schedule rendering of the component.
*/
override fun getMainComponentName(): String {
return "BlueWallet"
return "RedWallet"
}

override fun onCreate(savedInstanceState: Bundle?) {
Expand All @@ -42,7 +42,7 @@ class MainActivity : ReactActivity() {
}

private fun checkAndShowCacheClearedAlert() {
val sharedPref = getSharedPreferences("group.io.bluewallet.bluewallet", Context.MODE_PRIVATE)
val sharedPref = getSharedPreferences("group.com.layertwolabs.bluewallet", Context.MODE_PRIVATE)
val shouldShowAlert = sharedPref.getBoolean("shouldShowCacheClearedAlert", false)

if (shouldShowAlert) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class MainApplication : Application(), ReactApplication {

override fun onCreate() {
super.onCreate()
sharedPref = getSharedPreferences("group.io.bluewallet.bluewallet", Context.MODE_PRIVATE)
sharedPref = getSharedPreferences("group.com.layertwolabs.bluewallet", Context.MODE_PRIVATE)

// Handle clearFilesOnLaunch before registering listeners
clearFilesIfNeeded()
Expand Down
Loading
Loading