Skip to content

Commit

Permalink
fix: requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolantean committed Apr 17, 2024
1 parent 0c3a472 commit 02b9df3
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/actions/deploy-ios-firebase/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ description: "Deploy iOS to Firebase"
inputs:
xcode-version:
description: "Xcode version"
required: true
default: false
required: false
default: "15.1"
dist-certificate-base-64-content:
description: "Distribution certificate base64 encoded"
required: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/actions/deploy-ios-testflight/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ description: "Deploy iOS to TestFlight"
inputs:
xcode-version:
description: "Xcode version"
required: true
default: false
required: false
default: "15.1"
dist-certificate-base-64-content:
description: "Distribution certificate base64 encoded"
required: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/actions/ios-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ description: "Setup iOS for release"
inputs:
xcode-version:
description: "Xcode version"
required: true
default: false
required: false
default: "15.1"
dist-certificate-base-64-content:
description: "Distribution certificate base64 encoded"
required: true
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/flutter-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ jobs:
with:
lane: 'tests'
- name: 'Build android app'
env:
APP_ENV: 'dev'
uses: maierj/fastlane-action@v3.0.0
with:
lane: 'android build_dev_debug_apk'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/flutter-production-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- main
types:
- closed
- closed ## Trigger the workflow only when the PR is merged

env:
FIREBASE_ANDROID_APP_ID: "" ## Add your Firebase Android App ID here
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/flutter-staging-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- staging
types:
- closed
- closed ## Trigger the workflow only when the PR is merged

env:
FIREBASE_ANDROID_APP_ID: "" ## Add your Firebase Android App ID here
Expand Down
1 change: 1 addition & 0 deletions android/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ platform :android do
build_flutter(
build_platform: 'apk',
build_type: 'debug',
env: ENV['APP_ENV'],
)
end

Expand Down
1 change: 0 additions & 1 deletion fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -201,4 +201,3 @@ lane :get_next_build_number do
UI.message "Next Build Number: #{version}"
version
end

13 changes: 7 additions & 6 deletions ios/fastlane/Fastfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import "../../fastlane/Fastfile"

PROD_ENV = 'prod'
STAGING_ENV = 'staging'
DEFAULT_ENV = PROD_ENV
DEV_ENV = 'dev'
DEFAULT_ENV = DEV_ENV
PROD_BUNDLE_ID = "com.xmartlabs.template"
STAGING_BUNDLE_ID = "com.xmartlabs.template.sta"
DEV_BUNDLE_ID = "com.xmartlabs.template.dev"
temp_keychain_name = ENV['TEMP_KEYCHAIN_NAME'] || 'build.keychain'
temp_keychain_password = ENV['TEMP_KEYCHAIN_PASSWORD'] || '' ## Define default value
test_groups = ENV['TESTFLIGHT_TESTER_GROUPS'] || '' ## Define default value
Expand Down Expand Up @@ -44,7 +44,7 @@ platform :ios do
"* **`APPLE_TEAM_ID`**: The apple team id"
private_lane :setup_provisioning do |options|
env = options[:env] || DEFAULT_ENV
app_identifier = options[:env] == STAGING_ENV ? STAGING_BUNDLE_ID : PROD_BUNDLE_ID
app_identifier = options[:env] == DEV_ENV ? DEV_BUNDLE_ID : PROD_BUNDLE_ID
build_export_method = options[:build_export_method] || 'app-store'
adhoc = build_export_method == 'ad-hoc'
profile_type_name = adhoc ? 'AdHoc' : 'AppStore'
Expand All @@ -53,6 +53,7 @@ platform :ios do
adhoc: adhoc,
team_id: ENV['APPLE_TEAM_ID'],
force: true,
include_all_certificates: true,
provisioning_name: "#{provisioning_name}-#{profile_type_name}-#{env}",
app_identifier: app_identifier,
)
Expand Down Expand Up @@ -137,7 +138,7 @@ platform :ios do

increment_build_number(build_number: build_number)

app_identifier = options[:env] == STAGING_ENV ? STAGING_BUNDLE_ID : PROD_BUNDLE_ID
app_identifier = options[:env] == DEV_ENV ? DEV_BUNDLE_ID : PROD_BUNDLE_ID

build_ios_app(
clean: false,
Expand Down Expand Up @@ -168,7 +169,7 @@ platform :ios do
"* **`APPSTORE_CONNECT_API_KEY_BASE_64_CONTENT`**: The api key base64 content"
lane :deploy_firebase_app_distribution do |options|
generate_release_ipa(
env: 'staging',
env: DEFAULT_ENV,
build_export_method: 'ad-hoc',
setup_signing: true,
firebase_app_id: ENV['FIREBASE_APP_ID'],
Expand Down

0 comments on commit 02b9df3

Please sign in to comment.