From a0611cdf90511ee20006b38bad83f96c88a353f9 Mon Sep 17 00:00:00 2001 From: Marcos Rodriguez Velez Date: Wed, 11 Sep 2024 12:22:50 -0400 Subject: [PATCH 01/12] OPS: Lock files update YML --- .github/workflows/lockfiles_update.yml | 63 +++++++++++++ ios/BlueWallet.xcodeproj/project.pbxproj | 108 +++++++++++------------ ios/Podfile | 2 +- 3 files changed, 116 insertions(+), 57 deletions(-) create mode 100644 .github/workflows/lockfiles_update.yml diff --git a/.github/workflows/lockfiles_update.yml b/.github/workflows/lockfiles_update.yml new file mode 100644 index 000000000..a0e752b13 --- /dev/null +++ b/.github/workflows/lockfiles_update.yml @@ -0,0 +1,63 @@ +name: Update lock files + +on: + workflow_dispatch: # Manual trigger + +jobs: + pod-update: + runs-on: macos-latest + permissions: + contents: write + steps: + # Step 1: Checkout the repository + - name: Checkout project + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + # Step 2: Specify the node version and install node dependencies + - name: Specify node version + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Install node modules + run: npm install + + # Step 3: Set up Ruby and install Bundler dependencies + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.1.6 + bundler-cache: true + + - name: Install and update Ruby Gems + run: | + bundle install + bundle update + + # Step 4: Install CocoaPods and update pods + - name: Install CocoaPods Dependencies + run: | + cd ios + pod install + pod update + + # Step 5: Set up Git authentication to push changes + - name: Set up Git Authentication + 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)" + + # Step 6: Commit and push changes for package-lock.json, Podfile.lock, and Gemfile.lock + - name: Commit and create PR for dependency updates + run: | + git checkout -b pod-update-branch + git add package-lock.json ios/Podfile.lock Gemfile.lock + git commit -m "Update dependencies (npm, CocoaPods, Ruby gems)" + git push origin pod-update-branch + gh pr create --title "Pod and Dependency Update" --body "This PR updates npm, CocoaPods, and Ruby gem dependencies" --base master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/ios/BlueWallet.xcodeproj/project.pbxproj b/ios/BlueWallet.xcodeproj/project.pbxproj index f8dbda75d..5b85b5265 100644 --- a/ios/BlueWallet.xcodeproj/project.pbxproj +++ b/ios/BlueWallet.xcodeproj/project.pbxproj @@ -9,6 +9,7 @@ /* Begin PBXBuildFile section */ 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; + 17CDA0718F42DB2CE856C872 /* libPods-BlueWallet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 040819EDF8BD9C50A9C83E24 /* libPods-BlueWallet.a */; }; 32B5A32A2334450100F8D608 /* Bridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32B5A3292334450100F8D608 /* Bridge.swift */; }; 32F0A29A2311DBB20095C559 /* ComplicationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32F0A2992311DBB20095C559 /* ComplicationController.swift */; }; 6D2A6464258BA92D0092292B /* Stickers.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6D2A6463258BA92D0092292B /* Stickers.xcassets */; }; @@ -42,7 +43,6 @@ 6DFC807024EA0B6C007B8700 /* EFQRCode in Frameworks */ = {isa = PBXBuildFile; productRef = 6DFC806F24EA0B6C007B8700 /* EFQRCode */; }; 6DFC807224EA2FA9007B8700 /* ViewQRCodefaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DFC807124EA2FA9007B8700 /* ViewQRCodefaceController.swift */; }; 764B49B1420D4AEB8109BF62 /* libsqlite3.0.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 7B468CC34D5B41F3950078EF /* libsqlite3.0.tbd */; }; - 773E382FE62E836172AAB98B /* libPods-BlueWallet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 95304AD151F1F531985AA341 /* libPods-BlueWallet.a */; }; 782F075B5DD048449E2DECE9 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = B9D9B3A7B2CB4255876B67AF /* libz.tbd */; }; 849047CA2702A32A008EE567 /* Handoff.swift in Sources */ = {isa = PBXBuildFile; fileRef = 849047C92702A32A008EE567 /* Handoff.swift */; }; 84E05A842721191B001A0D3A /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 84E05A832721191B001A0D3A /* Settings.bundle */; }; @@ -212,11 +212,12 @@ /* Begin PBXFileReference section */ 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; }; 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 0C3D27CE367C0DD11F4B8772 /* Pods-BlueWalletUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BlueWalletUITests.release.xcconfig"; path = "Target Support Files/Pods-BlueWalletUITests/Pods-BlueWalletUITests.release.xcconfig"; sourceTree = ""; }; + 040819EDF8BD9C50A9C83E24 /* libPods-BlueWallet.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-BlueWallet.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 13B07F961A680F5B00A75B9A /* BlueWallet.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BlueWallet.app; sourceTree = BUILT_PRODUCTS_DIR; }; 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = BlueWallet/Images.xcassets; sourceTree = ""; }; 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = BlueWallet/Info.plist; sourceTree = ""; }; 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = BlueWallet/main.m; sourceTree = ""; }; + 1AE7FA8B4A18928E917F42D1 /* Pods-BlueWallet.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BlueWallet.debug.xcconfig"; path = "Target Support Files/Pods-BlueWallet/Pods-BlueWallet.debug.xcconfig"; sourceTree = ""; }; 1DD63E4B5C8344BB9880C9EC /* libReactNativePermissions.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libReactNativePermissions.a; sourceTree = ""; }; 253243E162CE4822BF3A3B7D /* libRNRandomBytes-tvOS.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = "libRNRandomBytes-tvOS.a"; sourceTree = ""; }; 2654894D4DE44A4C8F71773D /* CoreData.framework */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; @@ -288,11 +289,8 @@ 6DEB4C3A254FBF4800E9F9AA /* Colors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Colors.swift; sourceTree = ""; }; 6DF25A9E249DB97E001D06F5 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; }; 6DFC807124EA2FA9007B8700 /* ViewQRCodefaceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewQRCodefaceController.swift; sourceTree = ""; }; - 6E8A234AFCA1624321AE54F5 /* Pods-BlueWalletUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BlueWalletUITests.debug.xcconfig"; path = "Target Support Files/Pods-BlueWalletUITests/Pods-BlueWalletUITests.debug.xcconfig"; sourceTree = ""; }; 6EB3338E347F4AFAA8C85C04 /* libRNDeviceInfo-tvOS.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = "libRNDeviceInfo-tvOS.a"; sourceTree = ""; }; - 6F02C2F7CA3591E4E0B06EBA /* libPods-BlueWalletUITests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-BlueWalletUITests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 70C9C17A3F52430B99582AF4 /* libRNCamera.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNCamera.a; sourceTree = ""; }; - 77ED97C3CA4284744868B15D /* Pods-BlueWallet.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BlueWallet.release.xcconfig"; path = "Target Support Files/Pods-BlueWallet/Pods-BlueWallet.release.xcconfig"; sourceTree = ""; }; 78A87E7251D94144A71A2F67 /* FontAwesome5_Solid.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = FontAwesome5_Solid.ttf; path = "../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Solid.ttf"; sourceTree = ""; }; 7B468CC34D5B41F3950078EF /* libsqlite3.0.tbd */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.0.tbd; path = usr/lib/libsqlite3.0.tbd; sourceTree = SDKROOT; }; 8448882949434D41A054C0B2 /* ToolTipMenuTests.xctest */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = wrapper.cfbundle; path = ToolTipMenuTests.xctest; sourceTree = ""; }; @@ -300,9 +298,9 @@ 84E05A832721191B001A0D3A /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Settings.bundle; sourceTree = ""; }; 8637D4B5E14D443A9031DA95 /* libRNFS.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNFS.a; sourceTree = ""; }; 90F86BC5194548CA87D729A9 /* libToolTipMenu.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libToolTipMenu.a; sourceTree = ""; }; + 93D74F9C8EE7B4443A49594C /* Pods-BlueWallet.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BlueWallet.release.xcconfig"; path = "Target Support Files/Pods-BlueWallet/Pods-BlueWallet.release.xcconfig"; sourceTree = ""; }; 94565BFC6A0C4235B3EC7B01 /* libRNSVG.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNSVG.a; sourceTree = ""; }; 95208B2A05884A76B5BB99C0 /* libRCTGoogleAnalyticsBridge.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRCTGoogleAnalyticsBridge.a; sourceTree = ""; }; - 95304AD151F1F531985AA341 /* libPods-BlueWallet.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-BlueWallet.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 9DF4E6C040764E4BA1ACC1EB /* libTcpSockets.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libTcpSockets.a; sourceTree = ""; }; 9F1F51A83D044F3BB26A35FC /* libRNSVG-tvOS.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = "libRNSVG-tvOS.a"; sourceTree = ""; }; A7C4B1FDAD264618BAF8C335 /* libRNCWebView.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNCWebView.a; sourceTree = ""; }; @@ -361,7 +359,6 @@ B4D3235A177F4580BA52F2F9 /* libRNCSlider.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNCSlider.a; sourceTree = ""; }; B4EFF73A2C3F6C5E0095D655 /* MockData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockData.swift; sourceTree = ""; }; B642AFB13483418CAB6FF25E /* libRCTQRCodeLocalImage.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRCTQRCodeLocalImage.a; sourceTree = ""; }; - B68F8552DD4428F64B11DCFB /* Pods-BlueWallet.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BlueWallet.debug.xcconfig"; path = "Target Support Files/Pods-BlueWallet/Pods-BlueWallet.debug.xcconfig"; sourceTree = ""; }; B9D9B3A7B2CB4255876B67AF /* libz.tbd */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; }; BBA99996E6FA4B49ACE0BEFA /* libRNRate.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNRate.a; sourceTree = ""; }; CA741BA794714D3F80251AC9 /* Ionicons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Ionicons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Ionicons.ttf"; sourceTree = ""; }; @@ -385,7 +382,7 @@ 782F075B5DD048449E2DECE9 /* libz.tbd in Frameworks */, 764B49B1420D4AEB8109BF62 /* libsqlite3.0.tbd in Frameworks */, C978A716948AB7DEC5B6F677 /* BuildFile in Frameworks */, - 773E382FE62E836172AAB98B /* libPods-BlueWallet.a in Frameworks */, + 17CDA0718F42DB2CE856C872 /* libPods-BlueWallet.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -480,8 +477,7 @@ 3271B0AA236E2E0700DA766F /* NotificationCenter.framework */, 6D333B3A252FE1A3004D72DF /* WidgetKit.framework */, 6D333B3C252FE1A3004D72DF /* SwiftUI.framework */, - 95304AD151F1F531985AA341 /* libPods-BlueWallet.a */, - 6F02C2F7CA3591E4E0B06EBA /* libPods-BlueWalletUITests.a */, + 040819EDF8BD9C50A9C83E24 /* libPods-BlueWallet.a */, ); name = Frameworks; sourceTree = ""; @@ -778,10 +774,8 @@ FAA856B639C61E61D2CF90A8 /* Pods */ = { isa = PBXGroup; children = ( - B68F8552DD4428F64B11DCFB /* Pods-BlueWallet.debug.xcconfig */, - 77ED97C3CA4284744868B15D /* Pods-BlueWallet.release.xcconfig */, - 6E8A234AFCA1624321AE54F5 /* Pods-BlueWalletUITests.debug.xcconfig */, - 0C3D27CE367C0DD11F4B8772 /* Pods-BlueWalletUITests.release.xcconfig */, + 1AE7FA8B4A18928E917F42D1 /* Pods-BlueWallet.debug.xcconfig */, + 93D74F9C8EE7B4443A49594C /* Pods-BlueWallet.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -793,7 +787,7 @@ isa = PBXNativeTarget; buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "BlueWallet" */; buildPhases = ( - 3018134BCE2C10C2242F4CA3 /* [CP] Check Pods Manifest.lock */, + 3B467A525D105B531AB91B81 /* [CP] Check Pods Manifest.lock */, 13B07F871A680F5B00A75B9A /* Sources */, 13B07F8C1A680F5B00A75B9A /* Frameworks */, 13B07F8E1A680F5B00A75B9A /* Resources */, @@ -802,8 +796,8 @@ 3271B0B6236E2E0700DA766F /* Embed App Extensions */, A8D9893AE3CD454A9094B651 /* Upload source maps to Bugsnag */, 4B36CFF6FE55027DCA5CB6E1 /* Upload Bugsnag dSYM */, - 1D93562AB5DF61839917DB14 /* [CP] Embed Pods Frameworks */, - 4D8F1D9E38ABBC60EA8546DF /* [CP] Copy Pods Resources */, + BFE56A9A22A21E360BF7A1EC /* [CP] Embed Pods Frameworks */, + D0E81659D2FBFDD27024CF05 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -1051,24 +1045,7 @@ shellPath = /bin/sh; shellScript = "export EXTRA_PACKAGER_ARGS=\"--sourcemap-output $TMPDIR/$(md5 -qs \"$CONFIGURATION_BUILD_DIR\")-main.jsbundle.map\"\nexport NODE_BINARY=$(which node)\n../node_modules/react-native/scripts/react-native-xcode.sh\n"; }; - 1D93562AB5DF61839917DB14 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-BlueWallet/Pods-BlueWallet-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-BlueWallet/Pods-BlueWallet-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-BlueWallet/Pods-BlueWallet-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 3018134BCE2C10C2242F4CA3 /* [CP] Check Pods Manifest.lock */ = { + 3B467A525D105B531AB91B81 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -1111,23 +1088,6 @@ shellScript = "api_key = nil # Insert your key here to use it directly from this script\n\n# Attempt to get the API key from an environment variable\nunless api_key\n api_key = ENV[\"BUGSNAG_API_KEY\"]\n\n # If not present, attempt to lookup the value from the Info.plist\n unless api_key\n info_plist_path = \"#{ENV[\"BUILT_PRODUCTS_DIR\"]}/#{ENV[\"INFOPLIST_PATH\"]}\"\n plist_buddy_response = `/usr/libexec/PlistBuddy -c \"print :bugsnag:apiKey\" \"#{info_plist_path}\"`\n plist_buddy_response = `/usr/libexec/PlistBuddy -c \"print :BugsnagAPIKey\" \"#{info_plist_path}\"` if !$?.success?\n api_key = plist_buddy_response if $?.success?\n end\nend\n\nfail(\"No Bugsnag API key detected - add your key to your Info.plist, BUGSNAG_API_KEY environment variable or this Run Script phase\") unless api_key\n\nfork do\n Process.setsid\n STDIN.reopen(\"/dev/null\")\n STDOUT.reopen(\"/dev/null\", \"a\")\n STDERR.reopen(\"/dev/null\", \"a\")\n\n require 'shellwords'\n\n Dir[\"#{ENV[\"DWARF_DSYM_FOLDER_PATH\"]}/*/Contents/Resources/DWARF/*\"].each do |dsym|\n curl_command = \"curl --http1.1 -F dsym=@#{Shellwords.escape(dsym)} -F projectRoot=#{Shellwords.escape(ENV[\"PROJECT_DIR\"])} \"\n curl_command += \"-F apiKey=#{Shellwords.escape(api_key)} \"\n curl_command += \"https://upload.bugsnag.com/\"\n system(curl_command)\n end\nend\n"; showEnvVarsInLog = 0; }; - 4D8F1D9E38ABBC60EA8546DF /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-BlueWallet/Pods-BlueWallet-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-BlueWallet/Pods-BlueWallet-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-BlueWallet/Pods-BlueWallet-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; A8D9893AE3CD454A9094B651 /* Upload source maps to Bugsnag */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -1142,6 +1102,23 @@ shellPath = /bin/sh; shellScript = "SOURCE_MAP=\"$TMPDIR/$(md5 -qs \"$CONFIGURATION_BUILD_DIR\")-main.jsbundle.map\" ../node_modules/@bugsnag/react-native/bugsnag-react-native-xcode.sh\n"; }; + BFE56A9A22A21E360BF7A1EC /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-BlueWallet/Pods-BlueWallet-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-BlueWallet/Pods-BlueWallet-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-BlueWallet/Pods-BlueWallet-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; CF0725821442A3000F20E874 /* Upload Bugsnag dSYM */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -1163,6 +1140,23 @@ shellScript = "api_key = nil # Insert your key here to use it directly from this script\n\n# Attempt to get the API key from an environment variable\nunless api_key\n api_key = ENV[\"BUGSNAG_API_KEY\"]\n\n # If not present, attempt to lookup the value from the Info.plist\n unless api_key\n info_plist_path = \"#{ENV[\"BUILT_PRODUCTS_DIR\"]}/#{ENV[\"INFOPLIST_PATH\"]}\"\n plist_buddy_response = `/usr/libexec/PlistBuddy -c \"print :bugsnag:apiKey\" \"#{info_plist_path}\"`\n plist_buddy_response = `/usr/libexec/PlistBuddy -c \"print :BugsnagAPIKey\" \"#{info_plist_path}\"` if !$?.success?\n api_key = plist_buddy_response if $?.success?\n end\nend\n\nfail(\"No Bugsnag API key detected - add your key to your Info.plist, BUGSNAG_API_KEY environment variable or this Run Script phase\") unless api_key\n\nfork do\n Process.setsid\n STDIN.reopen(\"/dev/null\")\n STDOUT.reopen(\"/dev/null\", \"a\")\n STDERR.reopen(\"/dev/null\", \"a\")\n\n require 'shellwords'\n\n Dir[\"#{ENV[\"DWARF_DSYM_FOLDER_PATH\"]}/*/Contents/Resources/DWARF/*\"].each do |dsym|\n curl_command = \"curl --http1.1 -F dsym=@#{Shellwords.escape(dsym)} -F projectRoot=#{Shellwords.escape(ENV[\"PROJECT_DIR\"])} \"\n curl_command += \"-F apiKey=#{Shellwords.escape(api_key)} \"\n curl_command += \"https://upload.bugsnag.com/\"\n system(curl_command)\n end\nend\n"; showEnvVarsInLog = 0; }; + D0E81659D2FBFDD27024CF05 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-BlueWallet/Pods-BlueWallet-resources-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-BlueWallet/Pods-BlueWallet-resources-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-BlueWallet/Pods-BlueWallet-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -1351,7 +1345,7 @@ /* Begin XCBuildConfiguration section */ 13B07F941A680F5B00A75B9A /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = B68F8552DD4428F64B11DCFB /* Pods-BlueWallet.debug.xcconfig */; + baseConfigurationReference = 1AE7FA8B4A18928E917F42D1 /* Pods-BlueWallet.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; @@ -1411,7 +1405,7 @@ }; 13B07F951A680F5B00A75B9A /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 77ED97C3CA4284744868B15D /* Pods-BlueWallet.release.xcconfig */; + baseConfigurationReference = 93D74F9C8EE7B4443A49594C /* Pods-BlueWallet.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; @@ -1707,7 +1701,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.2; + IPHONEOS_DEPLOYMENT_TARGET = 13.4; LD = ""; LDPLUSPLUS = ""; LIBRARY_SEARCH_PATHS = "$(SDKROOT)/usr/lib/swift\"$(inherited)\""; @@ -1721,6 +1715,7 @@ SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG"; SWIFT_VERSION = 5.0; USE_HERMES = true; + WATCHOS_DEPLOYMENT_TARGET = 7.0; }; name = Debug; }; @@ -1771,7 +1766,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.2; + IPHONEOS_DEPLOYMENT_TARGET = 13.4; LD = ""; LDPLUSPLUS = ""; LIBRARY_SEARCH_PATHS = "$(SDKROOT)/usr/lib/swift\"$(inherited)\""; @@ -1785,6 +1780,7 @@ SWIFT_VERSION = 5.0; USE_HERMES = true; VALIDATE_PRODUCT = YES; + WATCHOS_DEPLOYMENT_TARGET = 7.0; }; name = Release; }; diff --git a/ios/Podfile b/ios/Podfile index 59f65f8fb..eddc5c744 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -19,7 +19,6 @@ require Pod::Executable.execute_command('node', ['-p', )', __dir__]).strip workspace 'BlueWallet' -project 'BlueWallet.xcodeproj' platform :ios, min_ios_version_supported prepare_react_native_project! setup_permissions(['Camera', 'Notifications']) @@ -56,6 +55,7 @@ post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.4' + if ['React-Core-AccessibilityResources'].include? target.name config.build_settings['CODE_SIGN_STYLE'] = "Manual" config.build_settings['CODE_SIGN_IDENTITY'] = "Apple Distribution: Bluewallet Services, S. R. L. (A7W54YZ4WU)" From 82ad9a3d8cbdfe5d7e18e424a33d691afbadca02 Mon Sep 17 00:00:00 2001 From: Marcos Rodriguez Velez Date: Wed, 11 Sep 2024 12:25:25 -0400 Subject: [PATCH 02/12] Update lockfiles_update.yml --- .github/workflows/lockfiles_update.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lockfiles_update.yml b/.github/workflows/lockfiles_update.yml index a0e752b13..a6ec55484 100644 --- a/.github/workflows/lockfiles_update.yml +++ b/.github/workflows/lockfiles_update.yml @@ -1,7 +1,9 @@ name: Update lock files - on: workflow_dispatch: # Manual trigger + pull_request: + branches: + - master jobs: pod-update: @@ -60,4 +62,4 @@ jobs: git push origin pod-update-branch gh pr create --title "Pod and Dependency Update" --body "This PR updates npm, CocoaPods, and Ruby gem dependencies" --base master env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 686bc4c63174909c4fba6ed810de96aeb624df98 Mon Sep 17 00:00:00 2001 From: Marcos Rodriguez Velez Date: Wed, 11 Sep 2024 12:35:35 -0400 Subject: [PATCH 03/12] Update lockfiles_update.yml --- .github/workflows/lockfiles_update.yml | 31 ++++++++++++++------------ 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/.github/workflows/lockfiles_update.yml b/.github/workflows/lockfiles_update.yml index a6ec55484..4ead8055f 100644 --- a/.github/workflows/lockfiles_update.yml +++ b/.github/workflows/lockfiles_update.yml @@ -1,4 +1,5 @@ name: Update lock files + on: workflow_dispatch: # Manual trigger pull_request: @@ -11,34 +12,36 @@ jobs: permissions: contents: write steps: - # Step 1: Checkout the repository - name: Checkout project uses: actions/checkout@v4 with: - fetch-depth: 0 - - # Step 2: Specify the node version and install node dependencies + fetch-depth: 0 # Fetches all history + + - name: Specify node version uses: actions/setup-node@v4 with: node-version: 20 - - - name: Install node modules - run: npm install - - # Step 3: Set up Ruby and install Bundler dependencies + + - uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: 15.4 + - name: Set up Ruby uses: ruby/setup-ruby@v1 with: ruby-version: 3.1.6 bundler-cache: true - - - name: Install and update Ruby Gems + + - name: Install dependencies with Bundler run: | - bundle install - bundle update + bundle config path vendor/bundle + bundle install --jobs 4 --retry 3 --quiet - # Step 4: Install CocoaPods and update pods + - name: Install node_modules + run: npm install --production + + # Step 4: Install CocoaPods and update pods - name: Install CocoaPods Dependencies run: | cd ios From d326b9ece3fe0cea6471813ee6de640f27971201 Mon Sep 17 00:00:00 2001 From: Marcos Rodriguez Velez Date: Wed, 11 Sep 2024 12:44:23 -0400 Subject: [PATCH 04/12] Update lockfiles_update.yml --- .github/workflows/lockfiles_update.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lockfiles_update.yml b/.github/workflows/lockfiles_update.yml index 4ead8055f..d75bd9ac8 100644 --- a/.github/workflows/lockfiles_update.yml +++ b/.github/workflows/lockfiles_update.yml @@ -51,7 +51,7 @@ jobs: # Step 5: Set up Git authentication to push changes - name: Set up Git Authentication env: - ACCESS_TOKEN: ${{ secrets.GIT_ACCESS_TOKEN }} + ACCESS_TOKEN: ${{ secrets.LOCKFILES_WORKFLOW }} 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)" From 2d51743916e9ac7db6b1d5dc7de032abd5607cb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Rodriguez=20V=C3=A9lez?= Date: Wed, 11 Sep 2024 12:53:10 -0400 Subject: [PATCH 05/12] Update lockfiles_update.yml --- .github/workflows/lockfiles_update.yml | 40 +++++++++++++------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/lockfiles_update.yml b/.github/workflows/lockfiles_update.yml index d75bd9ac8..9ea27ad08 100644 --- a/.github/workflows/lockfiles_update.yml +++ b/.github/workflows/lockfiles_update.yml @@ -1,4 +1,4 @@ -name: Update lock files +name: Lock files Update Workflow on: workflow_dispatch: # Manual trigger @@ -12,47 +12,47 @@ jobs: permissions: contents: write steps: + # Step 1: Checkout the repository - name: Checkout project uses: actions/checkout@v4 with: - fetch-depth: 0 # Fetches all history - - + fetch-depth: 0 + + # Step 2: Specify the node version and install node dependencies - name: Specify node version uses: actions/setup-node@v4 with: node-version: 20 - - - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: 15.4 - + + - name: Install node modules + run: npm install + + # Step 3: Set up Ruby and install Bundler dependencies - name: Set up Ruby uses: ruby/setup-ruby@v1 with: ruby-version: 3.1.6 bundler-cache: true - - - name: Install dependencies with Bundler + + - name: Install and update Ruby Gems run: | - bundle config path vendor/bundle - bundle install --jobs 4 --retry 3 --quiet + bundle install + bundle update - - name: Install node_modules - run: npm install --production - - # Step 4: Install CocoaPods and update pods + # Step 4: Install CocoaPods and update pods - name: Install CocoaPods Dependencies run: | cd ios pod install pod update - # Step 5: Set up Git authentication to push changes - - name: Set up Git Authentication + # Step 5: Set up Git authentication using the LockFiles team PAT + - name: Set up Git Authentication using LockFiles PAT env: ACCESS_TOKEN: ${{ secrets.LOCKFILES_WORKFLOW }} run: | + git config --global user.name "LockFiles Team" + git config --global user.email "lockfiles-team@example.com" 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)" @@ -65,4 +65,4 @@ jobs: git push origin pod-update-branch gh pr create --title "Pod and Dependency Update" --body "This PR updates npm, CocoaPods, and Ruby gem dependencies" --base master env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.LOCKFILES_WORKFLOW }} \ No newline at end of file From 1af7ae5f18d894fa107cb58534d2442dbaff92ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Rodriguez=20V=C3=A9lez?= Date: Wed, 11 Sep 2024 12:58:39 -0400 Subject: [PATCH 06/12] Update lockfiles_update.yml --- .github/workflows/lockfiles_update.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/lockfiles_update.yml b/.github/workflows/lockfiles_update.yml index 9ea27ad08..ffbd08c47 100644 --- a/.github/workflows/lockfiles_update.yml +++ b/.github/workflows/lockfiles_update.yml @@ -37,7 +37,6 @@ jobs: - name: Install and update Ruby Gems run: | bundle install - bundle update # Step 4: Install CocoaPods and update pods - name: Install CocoaPods Dependencies @@ -52,7 +51,6 @@ jobs: ACCESS_TOKEN: ${{ secrets.LOCKFILES_WORKFLOW }} run: | git config --global user.name "LockFiles Team" - git config --global user.email "lockfiles-team@example.com" 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)" @@ -60,9 +58,9 @@ jobs: - name: Commit and create PR for dependency updates run: | git checkout -b pod-update-branch - git add package-lock.json ios/Podfile.lock Gemfile.lock - git commit -m "Update dependencies (npm, CocoaPods, Ruby gems)" + git add package-lock.json ios/Podfile.lock + git commit -m "Update dependencies (CocoaPods)" git push origin pod-update-branch - gh pr create --title "Pod and Dependency Update" --body "This PR updates npm, CocoaPods, and Ruby gem dependencies" --base master + gh pr create --title "Pod and Dependency Update" --body "This PR updates Podfile.lock" --base master env: GITHUB_TOKEN: ${{ secrets.LOCKFILES_WORKFLOW }} \ No newline at end of file From 9e01331b071e139d858e535fa5a4eada27d165ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Rodriguez=20V=C3=A9lez?= Date: Wed, 11 Sep 2024 13:06:29 -0400 Subject: [PATCH 07/12] Update lockfiles_update.yml --- .github/workflows/lockfiles_update.yml | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/.github/workflows/lockfiles_update.yml b/.github/workflows/lockfiles_update.yml index ffbd08c47..b11e33e03 100644 --- a/.github/workflows/lockfiles_update.yml +++ b/.github/workflows/lockfiles_update.yml @@ -37,6 +37,7 @@ jobs: - name: Install and update Ruby Gems run: | bundle install + bundle update # Step 4: Install CocoaPods and update pods - name: Install CocoaPods Dependencies @@ -45,22 +46,17 @@ jobs: pod install pod update - # Step 5: Set up Git authentication using the LockFiles team PAT - - name: Set up Git Authentication using LockFiles PAT - env: - ACCESS_TOKEN: ${{ secrets.LOCKFILES_WORKFLOW }} - run: | - git config --global user.name "LockFiles Team" - 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)" - - # Step 6: Commit and push changes for package-lock.json, Podfile.lock, and Gemfile.lock - - name: Commit and create PR for dependency updates + # Step 5: Commit the changes + - name: Commit changes run: | git checkout -b pod-update-branch - git add package-lock.json ios/Podfile.lock + git add package-lock.json ios/Podfile.lock Gemfile.lock git commit -m "Update dependencies (CocoaPods)" + + # Step 6: Push the changes and create the PR using the LockFiles PAT + - name: Push and create PR + run: | git push origin pod-update-branch - gh pr create --title "Pod and Dependency Update" --body "This PR updates Podfile.lock" --base master + gh pr create --title "Pod and Dependency Update" --body "This PR updates npm, CocoaPods, and Ruby gem dependencies" --base master env: - GITHUB_TOKEN: ${{ secrets.LOCKFILES_WORKFLOW }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.LOCKFILES_WORKFLOW }} # Use the LockFiles PAT for PR creation \ No newline at end of file From 05ab0f48ec98dafcade114a4b6e7a3c678726f3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Rodriguez=20V=C3=A9lez?= Date: Wed, 11 Sep 2024 13:10:54 -0400 Subject: [PATCH 08/12] Update lockfiles_update.yml --- .github/workflows/lockfiles_update.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/lockfiles_update.yml b/.github/workflows/lockfiles_update.yml index b11e33e03..20167120a 100644 --- a/.github/workflows/lockfiles_update.yml +++ b/.github/workflows/lockfiles_update.yml @@ -37,7 +37,6 @@ jobs: - name: Install and update Ruby Gems run: | bundle install - bundle update # Step 4: Install CocoaPods and update pods - name: Install CocoaPods Dependencies From 5de6dc5bdec218925d43387beb3b49013e360506 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Rodriguez=20V=C3=A9lez?= Date: Wed, 11 Sep 2024 13:23:01 -0400 Subject: [PATCH 09/12] Update lockfiles_update.yml --- .github/workflows/lockfiles_update.yml | 66 ++++++++++++++++---------- 1 file changed, 41 insertions(+), 25 deletions(-) diff --git a/.github/workflows/lockfiles_update.yml b/.github/workflows/lockfiles_update.yml index 20167120a..76d8b9124 100644 --- a/.github/workflows/lockfiles_update.yml +++ b/.github/workflows/lockfiles_update.yml @@ -1,4 +1,4 @@ -name: Lock files Update Workflow +name: Lock Files Update on: workflow_dispatch: # Manual trigger @@ -12,13 +12,24 @@ jobs: permissions: contents: write steps: - # Step 1: Checkout the repository - - name: Checkout project + # Step 1: Checkout the repository and the master branch + - name: Checkout master branch uses: actions/checkout@v4 with: - fetch-depth: 0 + ref: master # Ensures we're checking out the master branch + fetch-depth: 0 # Ensures full history to enable branch deletion and recreation - # Step 2: Specify the node version and install node dependencies + # Step 2: Delete existing branch (if it exists) + - name: Delete existing branch + run: | + git push origin --delete pod-update-branch || echo "Branch does not exist, continuing..." + git branch -D pod-update-branch || echo "Local branch does not exist, continuing..." + + # Step 3: Create new branch from master + - name: Create new branch from master + run: git checkout -b pod-update-branch # Create a new branch from the master branch + + # Step 4: Specify the node version and install node dependencies - name: Specify node version uses: actions/setup-node@v4 with: @@ -27,35 +38,40 @@ jobs: - name: Install node modules run: npm install - # Step 3: Set up Ruby and install Bundler dependencies - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: 3.1.6 - bundler-cache: true - - - name: Install and update Ruby Gems - run: | - bundle install - - # Step 4: Install CocoaPods and update pods + # Step 5: Install CocoaPods and update pods - name: Install CocoaPods Dependencies run: | cd ios pod install pod update - # Step 5: Commit the changes + # Step 6: Commit the changes - name: Commit changes run: | - git checkout -b pod-update-branch - git add package-lock.json ios/Podfile.lock Gemfile.lock - git commit -m "Update dependencies (CocoaPods)" - - # Step 6: Push the changes and create the PR using the LockFiles PAT + git add package-lock.json ios/Podfile.lock + git commit -m "Update lock files (npm, CocoaPods)" + + # Step 7: Get the list of changed files for PR description + - name: Get changed files for PR description + id: get-changes + run: | + git diff --name-only HEAD^ HEAD > changed_files.txt + echo "CHANGES=$(cat changed_files.txt)" >> $GITHUB_ENV + + # Step 8: Push the changes and create the PR using the LockFiles PAT - name: Push and create PR run: | git push origin pod-update-branch - gh pr create --title "Pod and Dependency Update" --body "This PR updates npm, CocoaPods, and Ruby gem dependencies" --base master + gh pr create --title "Lock Files Updates" --body "The following files were updated:\n\n${{ env.CHANGES }}" --base master env: - GITHUB_TOKEN: ${{ secrets.LOCKFILES_WORKFLOW }} # Use the LockFiles PAT for PR creation \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.LOCKFILES_WORKFLOW }} # Use the LockFiles PAT for PR creation + + cleanup: + runs-on: macos-latest + if: github.event.pull_request.merged == true || github.event.pull_request.state == 'closed' + needs: pod-update + steps: + # Step 9: Delete the branch after PR merge/close + - name: Delete branch after PR merge/close + run: | + git push origin --delete pod-update-branch \ No newline at end of file From df20a4ec0d6ed8c12499232974ad22321783be2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Rodriguez=20V=C3=A9lez?= Date: Wed, 11 Sep 2024 13:35:46 -0400 Subject: [PATCH 10/12] Update lockfiles_update.yml --- .github/workflows/lockfiles_update.yml | 42 +++++++++++++++++++++----- 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/.github/workflows/lockfiles_update.yml b/.github/workflows/lockfiles_update.yml index 76d8b9124..a90494489 100644 --- a/.github/workflows/lockfiles_update.yml +++ b/.github/workflows/lockfiles_update.yml @@ -38,31 +38,59 @@ jobs: - name: Install node modules run: npm install - # Step 5: Install CocoaPods and update pods + # Step 5: Set up Ruby and install Bundler dependencies + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.1.6 + bundler-cache: true + + - name: Install and update Ruby Gems + run: | + bundle install + + # Step 6: Install CocoaPods and update pods - name: Install CocoaPods Dependencies run: | cd ios pod install pod update - # Step 6: Commit the changes + # Step 7: Check for changes in package-lock.json and Podfile.lock + - name: Check for changes + id: check-changes + run: | + git diff --quiet package-lock.json ios/Podfile.lock || echo "Changes detected" + continue-on-error: true + + # Step 8: Stop the workflow if no changes are found + - name: Stop job if no changes + if: steps.check-changes.outcome == 'success' + run: | + echo "No changes detected in package-lock.json or Podfile.lock. Stopping the job." + exit 0 + + # Step 9: Commit the changes (if changes are detected) - name: Commit changes + if: steps.check-changes.outcome != 'success' run: | git add package-lock.json ios/Podfile.lock - git commit -m "Update lock files (npm, CocoaPods)" + git commit -m "Update lock files" - # Step 7: Get the list of changed files for PR description + # Step 10: Get the list of changed files for PR description - name: Get changed files for PR description id: get-changes + if: steps.check-changes.outcome != 'success' run: | git diff --name-only HEAD^ HEAD > changed_files.txt echo "CHANGES=$(cat changed_files.txt)" >> $GITHUB_ENV - # Step 8: Push the changes and create the PR using the LockFiles PAT + # Step 11: Push the changes and create the PR using the LockFiles PAT - name: Push and create PR + if: steps.check-changes.outcome != 'success' run: | git push origin pod-update-branch - gh pr create --title "Lock Files Updates" --body "The following files were updated:\n\n${{ env.CHANGES }}" --base master + gh pr create --title "Lock Files Updates" --body "The following lock files were updated:\n\n${{ env.CHANGES }}" --base master env: GITHUB_TOKEN: ${{ secrets.LOCKFILES_WORKFLOW }} # Use the LockFiles PAT for PR creation @@ -71,7 +99,7 @@ jobs: if: github.event.pull_request.merged == true || github.event.pull_request.state == 'closed' needs: pod-update steps: - # Step 9: Delete the branch after PR merge/close + # Step 12: Delete the branch after PR merge/close - name: Delete branch after PR merge/close run: | git push origin --delete pod-update-branch \ No newline at end of file From 1e1284c729eadb7962d54b59a46f345c86d1766e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Rodriguez=20V=C3=A9lez?= Date: Wed, 11 Sep 2024 13:45:25 -0400 Subject: [PATCH 11/12] Update lockfiles_update.yml --- .github/workflows/lockfiles_update.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lockfiles_update.yml b/.github/workflows/lockfiles_update.yml index a90494489..cf4198574 100644 --- a/.github/workflows/lockfiles_update.yml +++ b/.github/workflows/lockfiles_update.yml @@ -2,7 +2,7 @@ name: Lock Files Update on: workflow_dispatch: # Manual trigger - pull_request: + push: branches: - master From 9ec29b7b6780bd20eb919d75f44305dbe1b6ec60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Rodriguez=20V=C3=A9lez?= Date: Wed, 11 Sep 2024 13:47:39 -0400 Subject: [PATCH 12/12] Update lockfiles_update.yml --- .github/workflows/lockfiles_update.yml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/.github/workflows/lockfiles_update.yml b/.github/workflows/lockfiles_update.yml index cf4198574..49ac56afb 100644 --- a/.github/workflows/lockfiles_update.yml +++ b/.github/workflows/lockfiles_update.yml @@ -1,7 +1,7 @@ name: Lock Files Update on: - workflow_dispatch: # Manual trigger + workflow_dispatch: push: branches: - master @@ -12,24 +12,21 @@ jobs: permissions: contents: write steps: - # Step 1: Checkout the repository and the master branch + - name: Checkout master branch uses: actions/checkout@v4 with: ref: master # Ensures we're checking out the master branch fetch-depth: 0 # Ensures full history to enable branch deletion and recreation - # Step 2: Delete existing branch (if it exists) - name: Delete existing branch run: | git push origin --delete pod-update-branch || echo "Branch does not exist, continuing..." git branch -D pod-update-branch || echo "Local branch does not exist, continuing..." - # Step 3: Create new branch from master - name: Create new branch from master run: git checkout -b pod-update-branch # Create a new branch from the master branch - # Step 4: Specify the node version and install node dependencies - name: Specify node version uses: actions/setup-node@v4 with: @@ -38,7 +35,6 @@ jobs: - name: Install node modules run: npm install - # Step 5: Set up Ruby and install Bundler dependencies - name: Set up Ruby uses: ruby/setup-ruby@v1 with: @@ -49,28 +45,24 @@ jobs: run: | bundle install - # Step 6: Install CocoaPods and update pods - name: Install CocoaPods Dependencies run: | cd ios pod install pod update - # Step 7: Check for changes in package-lock.json and Podfile.lock - name: Check for changes id: check-changes run: | git diff --quiet package-lock.json ios/Podfile.lock || echo "Changes detected" continue-on-error: true - # Step 8: Stop the workflow if no changes are found - name: Stop job if no changes if: steps.check-changes.outcome == 'success' run: | echo "No changes detected in package-lock.json or Podfile.lock. Stopping the job." exit 0 - # Step 9: Commit the changes (if changes are detected) - name: Commit changes if: steps.check-changes.outcome != 'success' run: | @@ -99,7 +91,7 @@ jobs: if: github.event.pull_request.merged == true || github.event.pull_request.state == 'closed' needs: pod-update steps: - # Step 12: Delete the branch after PR merge/close + - name: Delete branch after PR merge/close run: | git push origin --delete pod-update-branch \ No newline at end of file