Skip to content

Commit

Permalink
update Build App github action
Browse files Browse the repository at this point in the history
  • Loading branch information
mani-sh-reddy committed Nov 16, 2023
1 parent 9ddade3 commit 1c251c6
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 41 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/build-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
28 changes: 12 additions & 16 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
50 changes: 25 additions & 25 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
opt_out_usage
update_fastlane

default_platform(:ios)
# ------
Expand Down Expand Up @@ -116,52 +115,53 @@ 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
increment_versions
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

0 comments on commit 1c251c6

Please sign in to comment.