From 68c6a190fbc8e1b0778d42aac0d89941f59825e9 Mon Sep 17 00:00:00 2001 From: Alberto Cabrera Date: Thu, 11 Jan 2024 16:00:51 +0800 Subject: [PATCH 1/8] Update gemfile --- ios/Gemfile | 2 +- ios/Gemfile.lock | 163 ++++++++++++++++++++++++----------------------- ios/Podfile.lock | 32 +++------- 3 files changed, 95 insertions(+), 102 deletions(-) diff --git a/ios/Gemfile b/ios/Gemfile index 4068ded723..82d1e30494 100644 --- a/ios/Gemfile +++ b/ios/Gemfile @@ -1,4 +1,4 @@ source "https://rubygems.org" gem "fastlane" -gem "cocoapods", "1.14.3" +gem "cocoapods" diff --git a/ios/Gemfile.lock b/ios/Gemfile.lock index e2ffc7af42..d83a610eb6 100644 --- a/ios/Gemfile.lock +++ b/ios/Gemfile.lock @@ -3,70 +3,77 @@ GEM specs: CFPropertyList (3.0.6) rexml - activesupport (5.2.4.4) + activesupport (7.1.2) + base64 + bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 0.7, < 2) - minitest (~> 5.1) - tzinfo (~> 1.1) - addressable (2.8.5) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + minitest (>= 5.1) + mutex_m + tzinfo (~> 2.0) + addressable (2.8.6) public_suffix (>= 2.0.2, < 6.0) algoliasearch (1.27.5) httpclient (~> 2.8, >= 2.8.3) json (>= 1.5.1) artifactory (3.0.15) atomos (0.1.3) - aws-eventstream (1.2.0) - aws-partitions (1.825.0) - aws-sdk-core (3.182.0) - aws-eventstream (~> 1, >= 1.0.2) + aws-eventstream (1.3.0) + aws-partitions (1.878.0) + aws-sdk-core (3.190.2) + aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.651.0) - aws-sigv4 (~> 1.5) + aws-sigv4 (~> 1.8) jmespath (~> 1, >= 1.6.1) - aws-sdk-kms (1.71.0) - aws-sdk-core (~> 3, >= 3.177.0) + aws-sdk-kms (1.76.0) + aws-sdk-core (~> 3, >= 3.188.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.134.0) - aws-sdk-core (~> 3, >= 3.181.0) + aws-sdk-s3 (1.142.0) + aws-sdk-core (~> 3, >= 3.189.0) aws-sdk-kms (~> 1) - aws-sigv4 (~> 1.6) - aws-sigv4 (1.6.0) + aws-sigv4 (~> 1.8) + aws-sigv4 (1.8.0) aws-eventstream (~> 1, >= 1.0.2) babosa (1.0.4) + base64 (0.2.0) + bigdecimal (3.1.5) claide (1.1.0) - cocoapods (1.10.1) - addressable (~> 2.6) + cocoapods (1.14.3) + addressable (~> 2.8) claide (>= 1.0.2, < 2.0) - cocoapods-core (= 1.10.1) + cocoapods-core (= 1.14.3) cocoapods-deintegrate (>= 1.0.3, < 2.0) - cocoapods-downloader (>= 1.4.0, < 2.0) + cocoapods-downloader (>= 2.1, < 3.0) cocoapods-plugins (>= 1.0.0, < 2.0) cocoapods-search (>= 1.0.0, < 2.0) - cocoapods-trunk (>= 1.4.0, < 2.0) + cocoapods-trunk (>= 1.6.0, < 2.0) cocoapods-try (>= 1.1.0, < 2.0) colored2 (~> 3.1) escape (~> 0.0.4) fourflusher (>= 2.3.0, < 3.0) gh_inspector (~> 1.0) - molinillo (~> 0.6.6) + molinillo (~> 0.8.0) nap (~> 1.0) - ruby-macho (~> 1.4) - xcodeproj (>= 1.19.0, < 2.0) - cocoapods-core (1.10.1) - activesupport (> 5.0, < 6) - addressable (~> 2.6) + ruby-macho (>= 2.3.0, < 3.0) + xcodeproj (>= 1.23.0, < 2.0) + cocoapods-core (1.14.3) + activesupport (>= 5.0, < 8) + addressable (~> 2.8) algoliasearch (~> 1.0) concurrent-ruby (~> 1.1) fuzzy_match (~> 2.0.4) nap (~> 1.0) netrc (~> 0.11) - public_suffix + public_suffix (~> 4.0) typhoeus (~> 1.0) - cocoapods-deintegrate (1.0.4) - cocoapods-downloader (1.4.0) + cocoapods-deintegrate (1.0.5) + cocoapods-downloader (2.1) cocoapods-plugins (1.0.0) nap - cocoapods-search (1.0.0) - cocoapods-trunk (1.5.0) + cocoapods-search (1.0.1) + cocoapods-trunk (1.6.0) nap (>= 0.8, < 2.0) netrc (~> 0.11) cocoapods-try (1.2.0) @@ -74,18 +81,20 @@ GEM colored2 (3.1.2) commander (4.6.0) highline (~> 2.0.0) - concurrent-ruby (1.1.7) + concurrent-ruby (1.2.2) + connection_pool (2.4.1) declarative (0.0.20) digest-crc (0.6.5) rake (>= 12.0.0, < 14.0.0) - domain_name (0.5.20190701) - unf (>= 0.0.5, < 1.0.0) + domain_name (0.6.20240107) dotenv (2.8.1) + drb (2.2.0) + ruby2_keywords emoji_regex (3.2.3) escape (0.0.4) - ethon (0.12.0) - ffi (>= 1.3.0) - excon (0.103.0) + ethon (0.16.0) + ffi (>= 1.15.0) + excon (0.109.0) faraday (1.10.3) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) @@ -114,8 +123,8 @@ GEM faraday-retry (1.0.3) faraday_middleware (1.2.0) faraday (~> 1.0) - fastimage (2.2.7) - fastlane (2.214.0) + fastimage (2.3.0) + fastlane (2.219.0) CFPropertyList (>= 2.3, < 4.0.0) addressable (>= 2.8, < 3.0.0) artifactory (~> 3.0) @@ -134,33 +143,35 @@ GEM gh_inspector (>= 1.1.2, < 2.0.0) google-apis-androidpublisher_v3 (~> 0.3) google-apis-playcustomapp_v1 (~> 0.1) + google-cloud-env (>= 1.6.0, < 2.0.0) google-cloud-storage (~> 1.31) highline (~> 2.0) + http-cookie (~> 1.0.5) json (< 3.0.0) jwt (>= 2.1.0, < 3) mini_magick (>= 4.9.4, < 5.0.0) multipart-post (>= 2.0.0, < 3.0.0) naturally (~> 2.2) - optparse (~> 0.1.1) + optparse (>= 0.1.1) plist (>= 3.1.0, < 4.0.0) rubyzip (>= 2.0.0, < 3.0.0) security (= 0.1.3) simctl (~> 1.6.3) terminal-notifier (>= 2.0.0, < 3.0.0) - terminal-table (>= 1.4.5, < 2.0.0) + terminal-table (~> 3) tty-screen (>= 0.6.3, < 1.0.0) tty-spinner (>= 0.8.0, < 1.0.0) word_wrap (~> 1.0.0) xcodeproj (>= 1.13.0, < 2.0.0) xcpretty (~> 0.3.0) xcpretty-travis-formatter (>= 0.0.3) - ffi (1.14.2) + ffi (1.16.3) fourflusher (2.3.1) fuzzy_match (2.0.4) gh_inspector (1.1.3) - google-apis-androidpublisher_v3 (0.49.0) + google-apis-androidpublisher_v3 (0.54.0) google-apis-core (>= 0.11.0, < 2.a) - google-apis-core (0.11.1) + google-apis-core (0.11.2) addressable (~> 2.5, >= 2.5.1) googleauth (>= 0.16.2, < 2.a) httpclient (>= 2.8.1, < 3.a) @@ -173,54 +184,53 @@ GEM google-apis-core (>= 0.11.0, < 2.a) google-apis-playcustomapp_v1 (0.13.0) google-apis-core (>= 0.11.0, < 2.a) - google-apis-storage_v1 (0.19.0) - google-apis-core (>= 0.9.0, < 2.a) - google-cloud-core (1.6.0) - google-cloud-env (~> 1.0) + google-apis-storage_v1 (0.31.0) + google-apis-core (>= 0.11.0, < 2.a) + google-cloud-core (1.6.1) + google-cloud-env (>= 1.0, < 3.a) google-cloud-errors (~> 1.0) google-cloud-env (1.6.0) faraday (>= 0.17.3, < 3.0) google-cloud-errors (1.3.1) - google-cloud-storage (1.44.0) + google-cloud-storage (1.47.0) addressable (~> 2.8) digest-crc (~> 0.4) google-apis-iamcredentials_v1 (~> 0.1) - google-apis-storage_v1 (~> 0.19.0) + google-apis-storage_v1 (~> 0.31.0) google-cloud-core (~> 1.6) googleauth (>= 0.16.2, < 2.a) mini_mime (~> 1.0) - googleauth (0.17.1) - faraday (>= 0.17.3, < 2.0) + googleauth (1.8.1) + faraday (>= 0.17.3, < 3.a) jwt (>= 1.4, < 3.0) - memoist (~> 0.16) multi_json (~> 1.11) os (>= 0.9, < 2.0) - signet (~> 0.15) + signet (>= 0.16, < 2.a) highline (2.0.3) http-cookie (1.0.5) domain_name (~> 0.5) httpclient (2.8.3) - i18n (1.8.7) + i18n (1.14.1) concurrent-ruby (~> 1.0) jmespath (1.6.2) - json (2.6.3) + json (2.7.1) jwt (2.7.1) - memoist (0.16.2) mini_magick (4.12.0) mini_mime (1.1.5) - minitest (5.14.3) - molinillo (0.6.6) + minitest (5.20.0) + molinillo (0.8.0) multi_json (1.15.0) multipart-post (2.3.0) + mutex_m (0.2.0) nanaimo (0.3.0) nap (1.1.0) naturally (2.2.1) netrc (0.11.0) - optparse (0.1.1) + optparse (0.4.0) os (1.1.4) - plist (3.7.0) + plist (3.7.1) public_suffix (4.0.7) - rake (13.0.6) + rake (13.1.0) representable (3.2.0) declarative (< 0.1.0) trailblazer-option (>= 0.1.1, < 0.2.0) @@ -228,7 +238,7 @@ GEM retriable (3.1.2) rexml (3.2.6) rouge (2.0.7) - ruby-macho (1.4.0) + ruby-macho (2.5.1) ruby2_keywords (0.0.5) rubyzip (2.3.2) security (0.1.3) @@ -241,26 +251,22 @@ GEM CFPropertyList naturally terminal-notifier (2.0.0) - terminal-table (1.8.0) - unicode-display_width (~> 1.1, >= 1.1.1) - thread_safe (0.3.6) + terminal-table (3.0.2) + unicode-display_width (>= 1.1.1, < 3) trailblazer-option (0.1.2) tty-cursor (0.7.1) - tty-screen (0.8.1) + tty-screen (0.8.2) tty-spinner (0.9.3) tty-cursor (~> 0.7) - typhoeus (1.4.0) + typhoeus (1.4.1) ethon (>= 0.9.0) - tzinfo (1.2.9) - thread_safe (~> 0.1) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) uber (0.1.0) - unf (0.1.4) - unf_ext - unf_ext (0.0.8.2) - unicode-display_width (1.8.0) + unicode-display_width (2.5.0) webrick (1.8.1) word_wrap (1.0.0) - xcodeproj (1.22.0) + xcodeproj (1.23.0) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) claide (>= 1.0.2, < 2.0) @@ -273,12 +279,11 @@ GEM xcpretty (~> 0.2, >= 0.0.7) PLATFORMS - ruby - x64-mingw-ucrt + arm64-darwin-23 DEPENDENCIES cocoapods fastlane BUNDLED WITH - 2.4.19 + 2.4.10 diff --git a/ios/Podfile.lock b/ios/Podfile.lock index a162352c8b..7a23165e07 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -4,9 +4,6 @@ PODS: - AppAuth/ExternalUserAgent (= 1.4.0) - AppAuth/Core (1.4.0) - AppAuth/ExternalUserAgent (1.4.0) - - AppsFlyerFramework (6.1.3): - - AppsFlyerFramework/Main (= 6.1.3) - - AppsFlyerFramework/Main (6.1.3) - Base64 (1.1.2) - boost-for-react-native (1.63.0) - CocoaAsyncSocket (7.6.5) @@ -400,9 +397,6 @@ PODS: - React-cxxreact (= 0.63.4) - React-jsi (= 0.63.4) - React-jsinspector (0.63.4) - - react-native-appsflyer (6.1.30): - - AppsFlyerFramework (= 6.1.3) - - React - react-native-camera (3.33.0): - React - react-native-camera/RCT (= 3.33.0) @@ -427,8 +421,8 @@ PODS: - react-native-fbsdk/Share (2.0.0): - FBSDKShareKit (~> 7.0) - React - - react-native-version-check (3.4.1): - - React + - react-native-version-check (3.4.7): + - React-Core - react-native-video (5.0.2): - React - react-native-video/Video (= 5.0.2) @@ -494,10 +488,10 @@ PODS: - React-Core (= 0.63.4) - React-cxxreact (= 0.63.4) - React-jsi (= 0.63.4) - - RNAppleAuthentication (2.0.0-beta.1): - - React - - RNCPushNotificationIOS (1.3.0): - - React + - RNAppleAuthentication (2.0.2): + - React-Core + - RNCPushNotificationIOS (1.11.0): + - React-Core - RNDateTimePicker (2.6.1): - React - RNDeviceInfo (5.6.3): @@ -612,7 +606,6 @@ DEPENDENCIES: - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`) - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`) - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`) - - react-native-appsflyer (from `../node_modules/react-native-appsflyer`) - react-native-camera (from `../node_modules/react-native-camera`) - react-native-config (from `../node_modules/react-native-config`) - react-native-fbsdk (from `../node_modules/react-native-fbsdk`) @@ -663,7 +656,6 @@ DEPENDENCIES: SPEC REPOS: trunk: - AppAuth - - AppsFlyerFramework - Base64 - boost-for-react-native - CocoaAsyncSocket @@ -752,8 +744,6 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/ReactCommon/jsiexecutor" React-jsinspector: :path: "../node_modules/react-native/ReactCommon/jsinspector" - react-native-appsflyer: - :path: "../node_modules/react-native-appsflyer" react-native-camera: :path: "../node_modules/react-native-camera" react-native-config: @@ -849,7 +839,6 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: AppAuth: 31bcec809a638d7bd2f86ea8a52bd45f6e81e7c7 - AppsFlyerFramework: 4c735cfe40cd4dd809eba4e288e80f5fbde39d02 Base64: cecfb41a004124895a7bcee567a89bae5a89d49b boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 @@ -911,11 +900,10 @@ SPEC CHECKSUMS: React-jsi: a0418934cf48f25b485631deb27c64dc40fb4c31 React-jsiexecutor: 93bd528844ad21dc07aab1c67cb10abae6df6949 React-jsinspector: 58aef7155bc9a9683f5b60b35eccea8722a4f53a - react-native-appsflyer: 0fc0a27bcb4462fcba0d1d64b90aabf493f64174 react-native-camera: 55e1afb6d585314ca96ea5504e6b1ba7583c1d21 react-native-config: 55548054279d92e0e4566ea15a8b9b81028ec342 react-native-fbsdk: 00c15d138bba6d4efa628670886fc58cec858c19 - react-native-version-check: 40245490503879ff64f020b285ebc4075abd40c7 + react-native-version-check: 6cd36aad4e30b8e3216747e3b4ddeb09e0647af8 react-native-video: d01ed7ff1e38fa7dcc6c15c94cf505e661b7bfd0 React-RCTActionSheet: 89a0ca9f4a06c1f93c26067af074ccdce0f40336 React-RCTAnimation: 1bde3ecc0c104c55df246eda516e0deb03c4e49b @@ -927,8 +915,8 @@ SPEC CHECKSUMS: React-RCTText: 5c51df3f08cb9dedc6e790161195d12bac06101c React-RCTVibration: ae4f914cfe8de7d4de95ae1ea6cc8f6315d73d9d ReactCommon: 73d79c7039f473b76db6ff7c6b159c478acbbb3b - RNAppleAuthentication: 62164f126111672834b0259cce8af2c16df9e79f - RNCPushNotificationIOS: d5fd66aed4e03c6491ca0c6111a03d4f6455ff6c + RNAppleAuthentication: 09bf9752c73e1a19ba71b27538bc76cb4f8441a6 + RNCPushNotificationIOS: 64218f3c776c03d7408284a819b2abfda1834bc8 RNDateTimePicker: 83540fb5d71f28bd34990d8fabccb8d91e5d957e RNDeviceInfo: 5be12a5bfbb8da3528c43ee4373abd9c30d04616 RNFBAnalytics: ffd9149d1fe0ecee0f2571b234d53c25349b9899 @@ -965,4 +953,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 5f63cced5da52ebce75cafbb9a15e2bd7cd6075c -COCOAPODS: 1.10.1 +COCOAPODS: 1.14.3 From 5273568d95569b3060deab4e7bf31533ab30e46a Mon Sep 17 00:00:00 2001 From: Alberto Cabrera Date: Thu, 11 Jan 2024 16:05:50 +0800 Subject: [PATCH 2/8] comment out workflwo --- .github/workflows/ci-cd.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index e8647fb125..f226e69594 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -5,7 +5,7 @@ on: push: branches: [develop, master] pull_request: - branches: [develop, master] + # branches: [develop, master] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -232,7 +232,9 @@ jobs: ios-deploy: runs-on: macos-latest needs: [test, eslint, typescript, prettier] - if: github.event_name == 'push' && github.ref == 'refs/heads/master' + if: | + github.event_name == 'push' && github.ref == 'refs/heads/master' || + github.event_name == 'pull_request' && contains(['develop', 'master'], github.base_ref) steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 @@ -290,7 +292,7 @@ jobs: uses: actions/upload-artifact@v3 with: name: fastlane-gym-logs - path: "/Users/runner/Library/Logs/gym/MissionHub-MissionHub.log" + path: '/Users/runner/Library/Logs/gym/MissionHub-MissionHub.log' android-deploy: runs-on: ubuntu-latest From d5acf0d8f72edeb5dff62dbb97d2cba3ccc96b43 Mon Sep 17 00:00:00 2001 From: Alberto Cabrera Date: Thu, 11 Jan 2024 16:06:53 +0800 Subject: [PATCH 3/8] test --- .github/workflows/ci-cd.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index f226e69594..c45a0a369e 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -232,9 +232,8 @@ jobs: ios-deploy: runs-on: macos-latest needs: [test, eslint, typescript, prettier] - if: | - github.event_name == 'push' && github.ref == 'refs/heads/master' || - github.event_name == 'pull_request' && contains(['develop', 'master'], github.base_ref) + # if: | + # github.event_name == 'push' && github.ref == 'refs/heads/master' || github.event_name == 'pull_request' steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 From 9faa08244dd3dedfec6eee219e52ac0c650e8cfa Mon Sep 17 00:00:00 2001 From: Alberto Cabrera Date: Thu, 11 Jan 2024 16:11:00 +0800 Subject: [PATCH 4/8] remove test --- .github/workflows/ci-cd.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index c45a0a369e..692669c237 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -2,10 +2,7 @@ name: CI/CD # JavaScript CI and iOS, Android, and Codepush deployment on: - push: - branches: [develop, master] pull_request: - # branches: [develop, master] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -231,9 +228,6 @@ jobs: ios-deploy: runs-on: macos-latest - needs: [test, eslint, typescript, prettier] - # if: | - # github.event_name == 'push' && github.ref == 'refs/heads/master' || github.event_name == 'pull_request' steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 From 7953753fe66d648fc9ade00a4cd5772474054bb8 Mon Sep 17 00:00:00 2001 From: Alberto Cabrera Date: Thu, 11 Jan 2024 16:22:09 +0800 Subject: [PATCH 5/8] change permission --- .github/workflows/ci-cd.yml | 411 ++++++++++++++++++------------------ 1 file changed, 208 insertions(+), 203 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 692669c237..07d3799368 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -2,7 +2,10 @@ name: CI/CD # JavaScript CI and iOS, Android, and Codepush deployment on: + push: + branches: [develop, master] pull_request: + # branches: [develop, master] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -15,216 +18,216 @@ permissions: contents: read jobs: - split-tests: - runs-on: ubuntu-latest - outputs: - test-chunks: ${{ steps['set-test-chunks'].outputs['test-chunks'] }} - test-chunk-ids: ${{ steps['set-test-chunk-ids'].outputs['test-chunk-ids'] }} - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: 14 - - uses: egordm/gha-yarn-node-cache@v1 - - name: πŸ“¦ Install Dependencies - run: yarn - - id: set-test-chunks - name: Set Chunks - run: echo "::set-output name=test-chunks::$(yarn --silent test --listTests --json | jq -cM '[_nwise(length / 4 | floor)]')" - - id: set-test-chunk-ids - name: Set Chunk IDs - run: echo "::set-output name=test-chunk-ids::$(echo $CHUNKS | jq -cM 'to_entries | map(.key)')" - env: - CHUNKS: ${{ steps['set-test-chunks'].outputs['test-chunks'] }} + # split-tests: + # runs-on: ubuntu-latest + # outputs: + # test-chunks: ${{ steps['set-test-chunks'].outputs['test-chunks'] }} + # test-chunk-ids: ${{ steps['set-test-chunk-ids'].outputs['test-chunk-ids'] }} + # steps: + # - uses: actions/checkout@v2 + # - uses: actions/setup-node@v2 + # with: + # node-version: 14 + # - uses: egordm/gha-yarn-node-cache@v1 + # - name: πŸ“¦ Install Dependencies + # run: yarn + # - id: set-test-chunks + # name: Set Chunks + # run: echo "::set-output name=test-chunks::$(yarn --silent test --listTests --json | jq -cM '[_nwise(length / 4 | floor)]')" + # - id: set-test-chunk-ids + # name: Set Chunk IDs + # run: echo "::set-output name=test-chunk-ids::$(echo $CHUNKS | jq -cM 'to_entries | map(.key)')" + # env: + # CHUNKS: ${{ steps['set-test-chunks'].outputs['test-chunks'] }} - test: - runs-on: ubuntu-latest - name: test (chunk ${{ matrix.chunk }}) - needs: - - split-tests - strategy: - matrix: - chunk: ${{ fromJson(needs.split-tests.outputs['test-chunk-ids']) }} - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 2 - - uses: actions/setup-node@v2 - with: - node-version: 14 - - uses: egordm/gha-yarn-node-cache@v1 - - name: πŸ“¦ Install Dependencies - run: yarn - - name: πŸ“ˆ Run GraphQL Codegen - run: | - yarn gql:codegen - yarn gql:schema - - name: πŸ§ͺ Test (chunk ${{ matrix.chunk }}) - run: echo $CHUNKS | jq '.[${{ matrix.chunk }}] | .[] | @text' | xargs yarn test:coverage --ci - env: - CHUNKS: ${{ needs.split-tests.outputs['test-chunks'] }} - - name: Codecov - run: bash <(curl -s https://codecov.io/bash) + # test: + # runs-on: ubuntu-latest + # name: test (chunk ${{ matrix.chunk }}) + # needs: + # - split-tests + # strategy: + # matrix: + # chunk: ${{ fromJson(needs.split-tests.outputs['test-chunk-ids']) }} + # steps: + # - uses: actions/checkout@v2 + # with: + # fetch-depth: 2 + # - uses: actions/setup-node@v2 + # with: + # node-version: 14 + # - uses: egordm/gha-yarn-node-cache@v1 + # - name: πŸ“¦ Install Dependencies + # run: yarn + # - name: πŸ“ˆ Run GraphQL Codegen + # run: | + # yarn gql:codegen + # yarn gql:schema + # - name: πŸ§ͺ Test (chunk ${{ matrix.chunk }}) + # run: echo $CHUNKS | jq '.[${{ matrix.chunk }}] | .[] | @text' | xargs yarn test:coverage --ci + # env: + # CHUNKS: ${{ needs.split-tests.outputs['test-chunks'] }} + # - name: Codecov + # run: bash <(curl -s https://codecov.io/bash) - eslint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: 14 - - uses: egordm/gha-yarn-node-cache@v1 - - name: πŸ“¦ Install Dependencies - run: yarn - - name: πŸ“ˆ Run GraphQL Codegen - run: | - yarn gql:codegen - yarn gql:schema - - name: πŸ’¨ ESLint - run: yarn lint + # eslint: + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v2 + # - uses: actions/setup-node@v2 + # with: + # node-version: 14 + # - uses: egordm/gha-yarn-node-cache@v1 + # - name: πŸ“¦ Install Dependencies + # run: yarn + # - name: πŸ“ˆ Run GraphQL Codegen + # run: | + # yarn gql:codegen + # yarn gql:schema + # - name: πŸ’¨ ESLint + # run: yarn lint - typescript: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: 14 - - uses: egordm/gha-yarn-node-cache@v1 - - name: πŸ“¦ Install Dependencies - run: yarn - - name: πŸ“ˆ Run GraphQL Codegen - run: | - yarn gql:codegen - yarn gql:schema - - name: βœ… TypeScript lint - run: yarn lint:ts + # typescript: + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v2 + # - uses: actions/setup-node@v2 + # with: + # node-version: 14 + # - uses: egordm/gha-yarn-node-cache@v1 + # - name: πŸ“¦ Install Dependencies + # run: yarn + # - name: πŸ“ˆ Run GraphQL Codegen + # run: | + # yarn gql:codegen + # yarn gql:schema + # - name: βœ… TypeScript lint + # run: yarn lint:ts - prettier: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: 14 - - uses: egordm/gha-yarn-node-cache@v1 - - name: πŸ“¦ Install Dependencies - run: yarn - - name: πŸ’… Prettier Check - run: yarn prettier:check + # prettier: + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v2 + # - uses: actions/setup-node@v2 + # with: + # node-version: 14 + # - uses: egordm/gha-yarn-node-cache@v1 + # - name: πŸ“¦ Install Dependencies + # run: yarn + # - name: πŸ’… Prettier Check + # run: yarn prettier:check - onesky-upload: - runs-on: ubuntu-latest - needs: [test, eslint, typescript, prettier] - if: github.event_name == 'push' && github.ref == 'refs/heads/master' - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: 14 - - uses: egordm/gha-yarn-node-cache@v1 - - name: πŸ“¦ Install Dependencies - run: yarn - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v2 - with: - role-to-assume: ${{ secrets.AWS_IAM_ONESKY_ROLE_ARN }} - aws-region: us-east-1 - - name: Import OneSky Keys - uses: dkershner6/aws-ssm-getparameters-action@v1 - with: - parameterPairs: | - /shared/onesky/PUBLIC_KEY = ONESKY_API_KEY, - /shared/onesky/SECRET_KEY = ONESKY_SECRET_KEY - - name: β›…πŸ”Ό OneSky Upload - run: yarn onesky:upload + # onesky-upload: + # runs-on: ubuntu-latest + # needs: [test, eslint, typescript, prettier] + # if: github.event_name == 'push' && github.ref == 'refs/heads/master' + # steps: + # - uses: actions/checkout@v2 + # - uses: actions/setup-node@v2 + # with: + # node-version: 14 + # - uses: egordm/gha-yarn-node-cache@v1 + # - name: πŸ“¦ Install Dependencies + # run: yarn + # - name: Configure AWS credentials + # uses: aws-actions/configure-aws-credentials@v2 + # with: + # role-to-assume: ${{ secrets.AWS_IAM_ONESKY_ROLE_ARN }} + # aws-region: us-east-1 + # - name: Import OneSky Keys + # uses: dkershner6/aws-ssm-getparameters-action@v1 + # with: + # parameterPairs: | + # /shared/onesky/PUBLIC_KEY = ONESKY_API_KEY, + # /shared/onesky/SECRET_KEY = ONESKY_SECRET_KEY + # - name: β›…πŸ”Ό OneSky Upload + # run: yarn onesky:upload - ios-codepush: - runs-on: ubuntu-latest - needs: [test, eslint, typescript, prettier] - if: github.event_name == 'push' && github.ref == 'refs/heads/master' - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: 14 - - uses: egordm/gha-yarn-node-cache@v1 - - name: πŸ“¦ Install Dependencies - run: yarn - - name: πŸ“ˆ Run GraphQL Codegen - run: | - yarn gql:codegen - yarn gql:schema - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v2 - with: - role-to-assume: ${{ secrets.AWS_IAM_ONESKY_ROLE_ARN }} - aws-region: us-east-1 - - name: Import OneSky Keys - uses: dkershner6/aws-ssm-getparameters-action@v1 - with: - parameterPairs: | - /shared/onesky/PUBLIC_KEY = ONESKY_API_KEY, - /shared/onesky/SECRET_KEY = ONESKY_SECRET_KEY - - name: β›… OneSky Download - run: yarn onesky:download - - name: πŸ—οΈπŸš€πŸ Build and Codepush iOS - env: - APPCENTER_TOKEN: ${{ secrets.APPCENTER_TOKEN }} - # Codepush can't figure out how to parse MARKETING_VERSION https://github.com/microsoft/react-native-code-push/issues/1665 https://stackoverflow.com/a/58769925/665224 - run: yarn codepush-ios-staging --token "$APPCENTER_TOKEN" --sourcemap-output sourcemap.ios.js --extra-bundler-option="--sourcemap-sources-root" --extra-bundler-option="./" --description "#${{ github.run_id }} ${{ github.sha }} | ${{ github.event.head_commit.message }}" -t `sed -n '/MARKETING_VERSION/{s/MARKETING_VERSION = //;s/;//;s/^[[:space:]]*//;p;q;}' ./ios/MissionHub.xcodeproj/project.pbxproj` - - name: πŸ”ΌπŸπŸ—ΊοΈ Upload iOS sourcemaps to Rollbar - env: - ROLLBAR_POST_SERVER_ITEM_TOKEN: ${{ secrets.ROLLBAR_POST_SERVER_ITEM_TOKEN }} - run: | - curl https://api.rollbar.com/api/1/sourcemap \ - -F access_token=$ROLLBAR_POST_SERVER_ITEM_TOKEN \ - -F version=${{ github.sha }}.ios \ - -F minified_url=http://reactnativehost/main.jsbundle \ - -F source_map=@sourcemap.ios.js + # ios-codepush: + # runs-on: ubuntu-latest + # needs: [test, eslint, typescript, prettier] + # if: github.event_name == 'push' && github.ref == 'refs/heads/master' + # steps: + # - uses: actions/checkout@v2 + # - uses: actions/setup-node@v2 + # with: + # node-version: 14 + # - uses: egordm/gha-yarn-node-cache@v1 + # - name: πŸ“¦ Install Dependencies + # run: yarn + # - name: πŸ“ˆ Run GraphQL Codegen + # run: | + # yarn gql:codegen + # yarn gql:schema + # - name: Configure AWS credentials + # uses: aws-actions/configure-aws-credentials@v2 + # with: + # role-to-assume: ${{ secrets.AWS_IAM_ONESKY_ROLE_ARN }} + # aws-region: us-east-1 + # - name: Import OneSky Keys + # uses: dkershner6/aws-ssm-getparameters-action@v1 + # with: + # parameterPairs: | + # /shared/onesky/PUBLIC_KEY = ONESKY_API_KEY, + # /shared/onesky/SECRET_KEY = ONESKY_SECRET_KEY + # - name: β›… OneSky Download + # run: yarn onesky:download + # - name: πŸ—οΈπŸš€πŸ Build and Codepush iOS + # env: + # APPCENTER_TOKEN: ${{ secrets.APPCENTER_TOKEN }} + # # Codepush can't figure out how to parse MARKETING_VERSION https://github.com/microsoft/react-native-code-push/issues/1665 https://stackoverflow.com/a/58769925/665224 + # run: yarn codepush-ios-staging --token "$APPCENTER_TOKEN" --sourcemap-output sourcemap.ios.js --extra-bundler-option="--sourcemap-sources-root" --extra-bundler-option="./" --description "#${{ github.run_id }} ${{ github.sha }} | ${{ github.event.head_commit.message }}" -t `sed -n '/MARKETING_VERSION/{s/MARKETING_VERSION = //;s/;//;s/^[[:space:]]*//;p;q;}' ./ios/MissionHub.xcodeproj/project.pbxproj` + # - name: πŸ”ΌπŸπŸ—ΊοΈ Upload iOS sourcemaps to Rollbar + # env: + # ROLLBAR_POST_SERVER_ITEM_TOKEN: ${{ secrets.ROLLBAR_POST_SERVER_ITEM_TOKEN }} + # run: | + # curl https://api.rollbar.com/api/1/sourcemap \ + # -F access_token=$ROLLBAR_POST_SERVER_ITEM_TOKEN \ + # -F version=${{ github.sha }}.ios \ + # -F minified_url=http://reactnativehost/main.jsbundle \ + # -F source_map=@sourcemap.ios.js - android-codepush: - runs-on: ubuntu-latest - needs: [test, eslint, typescript, prettier] - if: github.event_name == 'push' && github.ref == 'refs/heads/master' - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: 14 - - uses: egordm/gha-yarn-node-cache@v1 - - name: πŸ“¦ Install Dependencies - run: yarn - - name: πŸ“ˆ Run GraphQL Codegen - run: | - yarn gql:codegen - yarn gql:schema - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v2 - with: - role-to-assume: ${{ secrets.AWS_IAM_ONESKY_ROLE_ARN }} - aws-region: us-east-1 - - name: Import OneSky Keys - uses: dkershner6/aws-ssm-getparameters-action@v1 - with: - parameterPairs: | - /shared/onesky/PUBLIC_KEY = ONESKY_API_KEY, - /shared/onesky/SECRET_KEY = ONESKY_SECRET_KEY - - name: β›… OneSky Download - run: yarn onesky:download - - name: πŸ—οΈπŸš€πŸ€– Build and Codepush Android - env: - APPCENTER_TOKEN: ${{ secrets.APPCENTER_TOKEN }} - run: yarn codepush-android-staging --token "$APPCENTER_TOKEN" --sourcemap-output sourcemap.android.js --extra-bundler-option="--sourcemap-sources-root" --extra-bundler-option="./" --description "#${{ github.run_id }} ${{ github.sha }} | ${{ github.event.head_commit.message }}" - - name: πŸ”ΌπŸ€–πŸ—ΊοΈ Upload Android sourcemaps to Rollbar - env: - ROLLBAR_POST_SERVER_ITEM_TOKEN: ${{ secrets.ROLLBAR_POST_SERVER_ITEM_TOKEN }} - run: | - curl https://api.rollbar.com/api/1/sourcemap \ - -F access_token=$ROLLBAR_POST_SERVER_ITEM_TOKEN \ - -F version=${{ github.sha }}.android \ - -F minified_url=http://reactnativehost/main.jsbundle \ - -F source_map=@sourcemap.android.js + # android-codepush: + # runs-on: ubuntu-latest + # needs: [test, eslint, typescript, prettier] + # if: github.event_name == 'push' && github.ref == 'refs/heads/master' + # steps: + # - uses: actions/checkout@v2 + # - uses: actions/setup-node@v2 + # with: + # node-version: 14 + # - uses: egordm/gha-yarn-node-cache@v1 + # - name: πŸ“¦ Install Dependencies + # run: yarn + # - name: πŸ“ˆ Run GraphQL Codegen + # run: | + # yarn gql:codegen + # yarn gql:schema + # - name: Configure AWS credentials + # uses: aws-actions/configure-aws-credentials@v2 + # with: + # role-to-assume: ${{ secrets.AWS_IAM_ONESKY_ROLE_ARN }} + # aws-region: us-east-1 + # - name: Import OneSky Keys + # uses: dkershner6/aws-ssm-getparameters-action@v1 + # with: + # parameterPairs: | + # /shared/onesky/PUBLIC_KEY = ONESKY_API_KEY, + # /shared/onesky/SECRET_KEY = ONESKY_SECRET_KEY + # - name: β›… OneSky Download + # run: yarn onesky:download + # - name: πŸ—οΈπŸš€πŸ€– Build and Codepush Android + # env: + # APPCENTER_TOKEN: ${{ secrets.APPCENTER_TOKEN }} + # run: yarn codepush-android-staging --token "$APPCENTER_TOKEN" --sourcemap-output sourcemap.android.js --extra-bundler-option="--sourcemap-sources-root" --extra-bundler-option="./" --description "#${{ github.run_id }} ${{ github.sha }} | ${{ github.event.head_commit.message }}" + # - name: πŸ”ΌπŸ€–πŸ—ΊοΈ Upload Android sourcemaps to Rollbar + # env: + # ROLLBAR_POST_SERVER_ITEM_TOKEN: ${{ secrets.ROLLBAR_POST_SERVER_ITEM_TOKEN }} + # run: | + # curl https://api.rollbar.com/api/1/sourcemap \ + # -F access_token=$ROLLBAR_POST_SERVER_ITEM_TOKEN \ + # -F version=${{ github.sha }}.android \ + # -F minified_url=http://reactnativehost/main.jsbundle \ + # -F source_map=@sourcemap.android.js ios-deploy: runs-on: macos-latest @@ -261,6 +264,8 @@ jobs: run: echo "COMMIT_SHA=$GITHUB_SHA" >> ./.env.production - name: πŸ— Configure GitHub login run: echo -e "machine github.com\n login $CI_USER_TOKEN" >> ~/.netrc + - name: πŸ”’ Set correct permissions for .netrc + run: chmod 0600 ~/.netrc env: CI_USER_TOKEN: ${{ secrets.CI_USER_TOKEN}} - name: Import App Store Connect API Key From 52a9c0f64de849bf86070855ed5b4bc63786734f Mon Sep 17 00:00:00 2001 From: Alberto Cabrera Date: Thu, 11 Jan 2024 16:23:35 +0800 Subject: [PATCH 6/8] added other steps --- .github/workflows/ci-cd.yml | 324 ++++++++++++++++++------------------ 1 file changed, 162 insertions(+), 162 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 07d3799368..2fd339ff21 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -18,175 +18,175 @@ permissions: contents: read jobs: - # split-tests: - # runs-on: ubuntu-latest - # outputs: - # test-chunks: ${{ steps['set-test-chunks'].outputs['test-chunks'] }} - # test-chunk-ids: ${{ steps['set-test-chunk-ids'].outputs['test-chunk-ids'] }} - # steps: - # - uses: actions/checkout@v2 - # - uses: actions/setup-node@v2 - # with: - # node-version: 14 - # - uses: egordm/gha-yarn-node-cache@v1 - # - name: πŸ“¦ Install Dependencies - # run: yarn - # - id: set-test-chunks - # name: Set Chunks - # run: echo "::set-output name=test-chunks::$(yarn --silent test --listTests --json | jq -cM '[_nwise(length / 4 | floor)]')" - # - id: set-test-chunk-ids - # name: Set Chunk IDs - # run: echo "::set-output name=test-chunk-ids::$(echo $CHUNKS | jq -cM 'to_entries | map(.key)')" - # env: - # CHUNKS: ${{ steps['set-test-chunks'].outputs['test-chunks'] }} + split-tests: + runs-on: ubuntu-latest + outputs: + test-chunks: ${{ steps['set-test-chunks'].outputs['test-chunks'] }} + test-chunk-ids: ${{ steps['set-test-chunk-ids'].outputs['test-chunk-ids'] }} + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 14 + - uses: egordm/gha-yarn-node-cache@v1 + - name: πŸ“¦ Install Dependencies + run: yarn + - id: set-test-chunks + name: Set Chunks + run: echo "::set-output name=test-chunks::$(yarn --silent test --listTests --json | jq -cM '[_nwise(length / 4 | floor)]')" + - id: set-test-chunk-ids + name: Set Chunk IDs + run: echo "::set-output name=test-chunk-ids::$(echo $CHUNKS | jq -cM 'to_entries | map(.key)')" + env: + CHUNKS: ${{ steps['set-test-chunks'].outputs['test-chunks'] }} - # test: - # runs-on: ubuntu-latest - # name: test (chunk ${{ matrix.chunk }}) - # needs: - # - split-tests - # strategy: - # matrix: - # chunk: ${{ fromJson(needs.split-tests.outputs['test-chunk-ids']) }} - # steps: - # - uses: actions/checkout@v2 - # with: - # fetch-depth: 2 - # - uses: actions/setup-node@v2 - # with: - # node-version: 14 - # - uses: egordm/gha-yarn-node-cache@v1 - # - name: πŸ“¦ Install Dependencies - # run: yarn - # - name: πŸ“ˆ Run GraphQL Codegen - # run: | - # yarn gql:codegen - # yarn gql:schema - # - name: πŸ§ͺ Test (chunk ${{ matrix.chunk }}) - # run: echo $CHUNKS | jq '.[${{ matrix.chunk }}] | .[] | @text' | xargs yarn test:coverage --ci - # env: - # CHUNKS: ${{ needs.split-tests.outputs['test-chunks'] }} - # - name: Codecov - # run: bash <(curl -s https://codecov.io/bash) + test: + runs-on: ubuntu-latest + name: test (chunk ${{ matrix.chunk }}) + needs: + - split-tests + strategy: + matrix: + chunk: ${{ fromJson(needs.split-tests.outputs['test-chunk-ids']) }} + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 2 + - uses: actions/setup-node@v2 + with: + node-version: 14 + - uses: egordm/gha-yarn-node-cache@v1 + - name: πŸ“¦ Install Dependencies + run: yarn + - name: πŸ“ˆ Run GraphQL Codegen + run: | + yarn gql:codegen + yarn gql:schema + - name: πŸ§ͺ Test (chunk ${{ matrix.chunk }}) + run: echo $CHUNKS | jq '.[${{ matrix.chunk }}] | .[] | @text' | xargs yarn test:coverage --ci + env: + CHUNKS: ${{ needs.split-tests.outputs['test-chunks'] }} + - name: Codecov + run: bash <(curl -s https://codecov.io/bash) - # eslint: - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v2 - # - uses: actions/setup-node@v2 - # with: - # node-version: 14 - # - uses: egordm/gha-yarn-node-cache@v1 - # - name: πŸ“¦ Install Dependencies - # run: yarn - # - name: πŸ“ˆ Run GraphQL Codegen - # run: | - # yarn gql:codegen - # yarn gql:schema - # - name: πŸ’¨ ESLint - # run: yarn lint + eslint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 14 + - uses: egordm/gha-yarn-node-cache@v1 + - name: πŸ“¦ Install Dependencies + run: yarn + - name: πŸ“ˆ Run GraphQL Codegen + run: | + yarn gql:codegen + yarn gql:schema + - name: πŸ’¨ ESLint + run: yarn lint - # typescript: - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v2 - # - uses: actions/setup-node@v2 - # with: - # node-version: 14 - # - uses: egordm/gha-yarn-node-cache@v1 - # - name: πŸ“¦ Install Dependencies - # run: yarn - # - name: πŸ“ˆ Run GraphQL Codegen - # run: | - # yarn gql:codegen - # yarn gql:schema - # - name: βœ… TypeScript lint - # run: yarn lint:ts + typescript: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 14 + - uses: egordm/gha-yarn-node-cache@v1 + - name: πŸ“¦ Install Dependencies + run: yarn + - name: πŸ“ˆ Run GraphQL Codegen + run: | + yarn gql:codegen + yarn gql:schema + - name: βœ… TypeScript lint + run: yarn lint:ts - # prettier: - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v2 - # - uses: actions/setup-node@v2 - # with: - # node-version: 14 - # - uses: egordm/gha-yarn-node-cache@v1 - # - name: πŸ“¦ Install Dependencies - # run: yarn - # - name: πŸ’… Prettier Check - # run: yarn prettier:check + prettier: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 14 + - uses: egordm/gha-yarn-node-cache@v1 + - name: πŸ“¦ Install Dependencies + run: yarn + - name: πŸ’… Prettier Check + run: yarn prettier:check - # onesky-upload: - # runs-on: ubuntu-latest - # needs: [test, eslint, typescript, prettier] - # if: github.event_name == 'push' && github.ref == 'refs/heads/master' - # steps: - # - uses: actions/checkout@v2 - # - uses: actions/setup-node@v2 - # with: - # node-version: 14 - # - uses: egordm/gha-yarn-node-cache@v1 - # - name: πŸ“¦ Install Dependencies - # run: yarn - # - name: Configure AWS credentials - # uses: aws-actions/configure-aws-credentials@v2 - # with: - # role-to-assume: ${{ secrets.AWS_IAM_ONESKY_ROLE_ARN }} - # aws-region: us-east-1 - # - name: Import OneSky Keys - # uses: dkershner6/aws-ssm-getparameters-action@v1 - # with: - # parameterPairs: | - # /shared/onesky/PUBLIC_KEY = ONESKY_API_KEY, - # /shared/onesky/SECRET_KEY = ONESKY_SECRET_KEY - # - name: β›…πŸ”Ό OneSky Upload - # run: yarn onesky:upload + onesky-upload: + runs-on: ubuntu-latest + needs: [test, eslint, typescript, prettier] + if: github.event_name == 'push' && github.ref == 'refs/heads/master' + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 14 + - uses: egordm/gha-yarn-node-cache@v1 + - name: πŸ“¦ Install Dependencies + run: yarn + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v2 + with: + role-to-assume: ${{ secrets.AWS_IAM_ONESKY_ROLE_ARN }} + aws-region: us-east-1 + - name: Import OneSky Keys + uses: dkershner6/aws-ssm-getparameters-action@v1 + with: + parameterPairs: | + /shared/onesky/PUBLIC_KEY = ONESKY_API_KEY, + /shared/onesky/SECRET_KEY = ONESKY_SECRET_KEY + - name: β›…πŸ”Ό OneSky Upload + run: yarn onesky:upload - # ios-codepush: - # runs-on: ubuntu-latest - # needs: [test, eslint, typescript, prettier] - # if: github.event_name == 'push' && github.ref == 'refs/heads/master' - # steps: - # - uses: actions/checkout@v2 - # - uses: actions/setup-node@v2 - # with: - # node-version: 14 - # - uses: egordm/gha-yarn-node-cache@v1 - # - name: πŸ“¦ Install Dependencies - # run: yarn - # - name: πŸ“ˆ Run GraphQL Codegen - # run: | - # yarn gql:codegen - # yarn gql:schema - # - name: Configure AWS credentials - # uses: aws-actions/configure-aws-credentials@v2 - # with: - # role-to-assume: ${{ secrets.AWS_IAM_ONESKY_ROLE_ARN }} - # aws-region: us-east-1 - # - name: Import OneSky Keys - # uses: dkershner6/aws-ssm-getparameters-action@v1 - # with: - # parameterPairs: | - # /shared/onesky/PUBLIC_KEY = ONESKY_API_KEY, - # /shared/onesky/SECRET_KEY = ONESKY_SECRET_KEY - # - name: β›… OneSky Download - # run: yarn onesky:download - # - name: πŸ—οΈπŸš€πŸ Build and Codepush iOS - # env: - # APPCENTER_TOKEN: ${{ secrets.APPCENTER_TOKEN }} - # # Codepush can't figure out how to parse MARKETING_VERSION https://github.com/microsoft/react-native-code-push/issues/1665 https://stackoverflow.com/a/58769925/665224 - # run: yarn codepush-ios-staging --token "$APPCENTER_TOKEN" --sourcemap-output sourcemap.ios.js --extra-bundler-option="--sourcemap-sources-root" --extra-bundler-option="./" --description "#${{ github.run_id }} ${{ github.sha }} | ${{ github.event.head_commit.message }}" -t `sed -n '/MARKETING_VERSION/{s/MARKETING_VERSION = //;s/;//;s/^[[:space:]]*//;p;q;}' ./ios/MissionHub.xcodeproj/project.pbxproj` - # - name: πŸ”ΌπŸπŸ—ΊοΈ Upload iOS sourcemaps to Rollbar - # env: - # ROLLBAR_POST_SERVER_ITEM_TOKEN: ${{ secrets.ROLLBAR_POST_SERVER_ITEM_TOKEN }} - # run: | - # curl https://api.rollbar.com/api/1/sourcemap \ - # -F access_token=$ROLLBAR_POST_SERVER_ITEM_TOKEN \ - # -F version=${{ github.sha }}.ios \ - # -F minified_url=http://reactnativehost/main.jsbundle \ - # -F source_map=@sourcemap.ios.js + ios-codepush: + runs-on: ubuntu-latest + needs: [test, eslint, typescript, prettier] + if: github.event_name == 'push' && github.ref == 'refs/heads/master' + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 14 + - uses: egordm/gha-yarn-node-cache@v1 + - name: πŸ“¦ Install Dependencies + run: yarn + - name: πŸ“ˆ Run GraphQL Codegen + run: | + yarn gql:codegen + yarn gql:schema + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v2 + with: + role-to-assume: ${{ secrets.AWS_IAM_ONESKY_ROLE_ARN }} + aws-region: us-east-1 + - name: Import OneSky Keys + uses: dkershner6/aws-ssm-getparameters-action@v1 + with: + parameterPairs: | + /shared/onesky/PUBLIC_KEY = ONESKY_API_KEY, + /shared/onesky/SECRET_KEY = ONESKY_SECRET_KEY + - name: β›… OneSky Download + run: yarn onesky:download + - name: πŸ—οΈπŸš€πŸ Build and Codepush iOS + env: + APPCENTER_TOKEN: ${{ secrets.APPCENTER_TOKEN }} + # Codepush can't figure out how to parse MARKETING_VERSION https://github.com/microsoft/react-native-code-push/issues/1665 https://stackoverflow.com/a/58769925/665224 + run: yarn codepush-ios-staging --token "$APPCENTER_TOKEN" --sourcemap-output sourcemap.ios.js --extra-bundler-option="--sourcemap-sources-root" --extra-bundler-option="./" --description "#${{ github.run_id }} ${{ github.sha }} | ${{ github.event.head_commit.message }}" -t `sed -n '/MARKETING_VERSION/{s/MARKETING_VERSION = //;s/;//;s/^[[:space:]]*//;p;q;}' ./ios/MissionHub.xcodeproj/project.pbxproj` + - name: πŸ”ΌπŸπŸ—ΊοΈ Upload iOS sourcemaps to Rollbar + env: + ROLLBAR_POST_SERVER_ITEM_TOKEN: ${{ secrets.ROLLBAR_POST_SERVER_ITEM_TOKEN }} + run: | + curl https://api.rollbar.com/api/1/sourcemap \ + -F access_token=$ROLLBAR_POST_SERVER_ITEM_TOKEN \ + -F version=${{ github.sha }}.ios \ + -F minified_url=http://reactnativehost/main.jsbundle \ + -F source_map=@sourcemap.ios.js - # android-codepush: + android-codepush: # runs-on: ubuntu-latest # needs: [test, eslint, typescript, prettier] # if: github.event_name == 'push' && github.ref == 'refs/heads/master' From 0144b8ac994ab8143040ed35da253b9273d46146 Mon Sep 17 00:00:00 2001 From: Alberto Cabrera Date: Thu, 11 Jan 2024 16:24:41 +0800 Subject: [PATCH 7/8] fix --- .github/workflows/ci-cd.yml | 82 ++++++++++++++++++------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 2fd339ff21..d8686a0b46 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -187,47 +187,47 @@ jobs: -F source_map=@sourcemap.ios.js android-codepush: - # runs-on: ubuntu-latest - # needs: [test, eslint, typescript, prettier] - # if: github.event_name == 'push' && github.ref == 'refs/heads/master' - # steps: - # - uses: actions/checkout@v2 - # - uses: actions/setup-node@v2 - # with: - # node-version: 14 - # - uses: egordm/gha-yarn-node-cache@v1 - # - name: πŸ“¦ Install Dependencies - # run: yarn - # - name: πŸ“ˆ Run GraphQL Codegen - # run: | - # yarn gql:codegen - # yarn gql:schema - # - name: Configure AWS credentials - # uses: aws-actions/configure-aws-credentials@v2 - # with: - # role-to-assume: ${{ secrets.AWS_IAM_ONESKY_ROLE_ARN }} - # aws-region: us-east-1 - # - name: Import OneSky Keys - # uses: dkershner6/aws-ssm-getparameters-action@v1 - # with: - # parameterPairs: | - # /shared/onesky/PUBLIC_KEY = ONESKY_API_KEY, - # /shared/onesky/SECRET_KEY = ONESKY_SECRET_KEY - # - name: β›… OneSky Download - # run: yarn onesky:download - # - name: πŸ—οΈπŸš€πŸ€– Build and Codepush Android - # env: - # APPCENTER_TOKEN: ${{ secrets.APPCENTER_TOKEN }} - # run: yarn codepush-android-staging --token "$APPCENTER_TOKEN" --sourcemap-output sourcemap.android.js --extra-bundler-option="--sourcemap-sources-root" --extra-bundler-option="./" --description "#${{ github.run_id }} ${{ github.sha }} | ${{ github.event.head_commit.message }}" - # - name: πŸ”ΌπŸ€–πŸ—ΊοΈ Upload Android sourcemaps to Rollbar - # env: - # ROLLBAR_POST_SERVER_ITEM_TOKEN: ${{ secrets.ROLLBAR_POST_SERVER_ITEM_TOKEN }} - # run: | - # curl https://api.rollbar.com/api/1/sourcemap \ - # -F access_token=$ROLLBAR_POST_SERVER_ITEM_TOKEN \ - # -F version=${{ github.sha }}.android \ - # -F minified_url=http://reactnativehost/main.jsbundle \ - # -F source_map=@sourcemap.android.js + runs-on: ubuntu-latest + needs: [test, eslint, typescript, prettier] + if: github.event_name == 'push' && github.ref == 'refs/heads/master' + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 14 + - uses: egordm/gha-yarn-node-cache@v1 + - name: πŸ“¦ Install Dependencies + run: yarn + - name: πŸ“ˆ Run GraphQL Codegen + run: | + yarn gql:codegen + yarn gql:schema + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v2 + with: + role-to-assume: ${{ secrets.AWS_IAM_ONESKY_ROLE_ARN }} + aws-region: us-east-1 + - name: Import OneSky Keys + uses: dkershner6/aws-ssm-getparameters-action@v1 + with: + parameterPairs: | + /shared/onesky/PUBLIC_KEY = ONESKY_API_KEY, + /shared/onesky/SECRET_KEY = ONESKY_SECRET_KEY + - name: β›… OneSky Download + run: yarn onesky:download + - name: πŸ—οΈπŸš€πŸ€– Build and Codepush Android + env: + APPCENTER_TOKEN: ${{ secrets.APPCENTER_TOKEN }} + run: yarn codepush-android-staging --token "$APPCENTER_TOKEN" --sourcemap-output sourcemap.android.js --extra-bundler-option="--sourcemap-sources-root" --extra-bundler-option="./" --description "#${{ github.run_id }} ${{ github.sha }} | ${{ github.event.head_commit.message }}" + - name: πŸ”ΌπŸ€–πŸ—ΊοΈ Upload Android sourcemaps to Rollbar + env: + ROLLBAR_POST_SERVER_ITEM_TOKEN: ${{ secrets.ROLLBAR_POST_SERVER_ITEM_TOKEN }} + run: | + curl https://api.rollbar.com/api/1/sourcemap \ + -F access_token=$ROLLBAR_POST_SERVER_ITEM_TOKEN \ + -F version=${{ github.sha }}.android \ + -F minified_url=http://reactnativehost/main.jsbundle \ + -F source_map=@sourcemap.android.js ios-deploy: runs-on: macos-latest From 21424769f1625a6bbd175f9ae9a929845443bd6f Mon Sep 17 00:00:00 2001 From: Alberto Cabrera Date: Thu, 11 Jan 2024 16:35:39 +0800 Subject: [PATCH 8/8] upate --- .github/workflows/ci-cd.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index d8686a0b46..0743533f98 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -264,10 +264,10 @@ jobs: run: echo "COMMIT_SHA=$GITHUB_SHA" >> ./.env.production - name: πŸ— Configure GitHub login run: echo -e "machine github.com\n login $CI_USER_TOKEN" >> ~/.netrc - - name: πŸ”’ Set correct permissions for .netrc - run: chmod 0600 ~/.netrc env: CI_USER_TOKEN: ${{ secrets.CI_USER_TOKEN}} + - name: πŸ”’ Set correct permissions for .netrc + run: chmod 0600 ~/.netrc - name: Import App Store Connect API Key env: APP_STORE_CONNECT_API_JSON_PAYLOAD: ${{ secrets.APP_STORE_CONNECT_API_JSON_PAYLOAD }}