From 1c251c6f2d796c1803774fe97ca2eb90ffd4858e Mon Sep 17 00:00:00 2001 From: Manish Reddy <47571755+mani-sh-reddy@users.noreply.github.com> Date: Thu, 16 Nov 2023 19:48:41 +0000 Subject: [PATCH] update Build App github action --- .github/workflows/build-app.yml | 7 +++++ Gemfile.lock | 28 ++++++++---------- fastlane/Fastfile | 50 ++++++++++++++++----------------- 3 files changed, 44 insertions(+), 41 deletions(-) diff --git a/.github/workflows/build-app.yml b/.github/workflows/build-app.yml index 0b880b91..57488691 100644 --- a/.github/workflows/build-app.yml +++ b/.github/workflows/build-app.yml @@ -35,11 +35,14 @@ jobs: with: fetch-depth: 0 # all history fetch-tags: true + - name: Install Homebrew Dependencies run: | env HOMEBREW_NO_AUTO_UPDATE=1 brew install xcbeautify + - name: Select Xcode version run: sudo xcode-select -s '/Applications/Xcode_15.0.1.app/Contents/Developer' + - name: Setup Ruby uses: ruby/setup-ruby@v1 with: @@ -48,18 +51,22 @@ jobs: bundler: "2.2.27" rubygems: "latest" cache-version: 1 + - name: Update fastlane run: bundle update fastlane + - name: Cache Xcode Data uses: irgaly/xcode-cache@v1 with: key: xcode-cache-deriveddata-${{ github.workflow }}-${{ github.sha }} restore-keys: xcode-cache-deriveddata-${{ github.workflow }}- + - run: bundle exec fastlane increment_versions - run: bundle exec fastlane ci_create_keychain - run: bundle exec fastlane ci_lunar_sign - run: bundle exec fastlane lunar_build # - run: bundle exec fastlane lunar_deploy + # - run: bundle exec fastlane write_changelog - name: Archive IPA and dSYM artifacts uses: actions/upload-artifact@v3 diff --git a/Gemfile.lock b/Gemfile.lock index a56f6174..ce01ea6f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,8 +8,8 @@ GEM artifactory (3.0.15) atomos (0.1.3) aws-eventstream (1.2.0) - aws-partitions (1.837.0) - aws-sdk-core (3.185.1) + aws-partitions (1.851.0) + aws-sdk-core (3.186.0) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.651.0) aws-sigv4 (~> 1.5) @@ -21,7 +21,7 @@ GEM aws-sdk-core (~> 3, >= 3.181.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.6) - aws-sigv4 (1.6.0) + aws-sigv4 (1.6.1) aws-eventstream (~> 1, >= 1.0.2) babosa (1.0.4) claide (1.1.0) @@ -32,8 +32,7 @@ GEM 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.20231109) dotenv (2.8.1) emoji_regex (3.2.3) excon (0.104.0) @@ -66,7 +65,7 @@ GEM faraday_middleware (1.2.0) faraday (~> 1.0) fastimage (2.2.7) - fastlane (2.216.0) + fastlane (2.217.0) CFPropertyList (>= 2.3, < 4.0.0) addressable (>= 2.8, < 3.0.0) artifactory (~> 3.0) @@ -109,9 +108,9 @@ GEM fastlane-plugin-changelog (0.16.0) fastlane-plugin-versioning (0.5.2) gh_inspector (1.1.3) - google-apis-androidpublisher_v3 (0.51.0) + google-apis-androidpublisher_v3 (0.52.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) @@ -124,19 +123,19 @@ 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-apis-storage_v1 (0.29.0) + google-apis-core (>= 0.11.0, < 2.a) google-cloud-core (1.6.0) google-cloud-env (~> 1.0) 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.45.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.29.0) google-cloud-core (~> 1.6) googleauth (>= 0.16.2, < 2.a) mini_mime (~> 1.0) @@ -163,7 +162,7 @@ GEM os (1.1.4) plist (3.7.0) public_suffix (5.0.3) - rake (13.0.6) + rake (13.1.0) representable (3.2.0) declarative (< 0.1.0) trailblazer-option (>= 0.1.1, < 0.2.0) @@ -191,9 +190,6 @@ GEM tty-spinner (0.9.3) tty-cursor (~> 0.7) uber (0.1.0) - unf (0.1.4) - unf_ext - unf_ext (0.0.8.2) unicode-display_width (2.5.0) webrick (1.8.1) word_wrap (1.0.0) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 8bc24933..5239e983 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -1,5 +1,4 @@ opt_out_usage -update_fastlane default_platform(:ios) # ------ @@ -116,19 +115,41 @@ lane :lunar_deploy do ) end -lane :set_changelog do +lane :write_changelog do stamp_changelog( section_identifier: LATEST_GIT_TAG.to_s, should_stamp_date: false ) end +lane :local_to_github_release do + create_pull_request( + repo: 'mani-sh-reddy/Lunar', + api_token: REPO_GITHUB_TOKEN.to_s, + title: LATEST_GIT_TAG.to_s, + head: 'dev', + base: 'release', + body: CHANGELOG_LATEST_SECTION.to_s + ) + + set_github_release( + repository_name: 'mani-sh-reddy/Lunar', + api_token: REPO_GITHUB_TOKEN.to_s, + name: LATEST_GIT_TAG.to_s, + tag_name: LATEST_GIT_TAG.to_s, + description: CHANGELOG_LATEST_SECTION.to_s, + commitish: 'dev', + upload_assets: ['Lunar.ipa'] + ) +end + lane :CI_TO_TESTFLIGHT_DEPLOY do increment_versions ci_create_keychain ci_lunar_sign lunar_build lunar_deploy + write_changelog end lane :LOCAL_TO_TESTFLIGHT_DEPLOY do @@ -136,32 +157,11 @@ lane :LOCAL_TO_TESTFLIGHT_DEPLOY do lunar_sign lunar_build lunar_deploy - generate_github_release - set_changelog + local_to_github_release + write_changelog # reset_git_repo( # force: true, # files: ['./Lunar.xcodeproj/project.pbxproj'] # ) end - -lane :generate_github_release do - create_pull_request( - repo: 'mani-sh-reddy/Lunar', - api_token: REPO_GITHUB_TOKEN.to_s, - title: LATEST_GIT_TAG.to_s, - head: 'dev', - base: 'testflight', - body: CHANGELOG_LATEST_SECTION.to_s - ) - - set_github_release( - repository_name: 'mani-sh-reddy/Lunar', - api_token: REPO_GITHUB_TOKEN.to_s, - name: LATEST_GIT_TAG.to_s, - tag_name: LATEST_GIT_TAG.to_s, - description: CHANGELOG_LATEST_SECTION.to_s, - commitish: 'dev', - upload_assets: ['Lunar.ipa'] - ) -end