forked from eatvio/eatvio_app
Merge pull request 'main' (#607) from main into test-flight
Reviewed-on: eatvio/eatvio_app#607
This commit is contained in:
@@ -11,30 +11,6 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Checkout env repository
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
repository: mso7nueh/eatvio_app_env
|
|
||||||
path: env_repo
|
|
||||||
token: ${{ vars.MSO7NUEH_TOKEN }}
|
|
||||||
ref: main
|
|
||||||
|
|
||||||
- name: Copy .env file
|
|
||||||
run: |
|
|
||||||
mkdir -p env
|
|
||||||
cp env_repo/.env env/.env
|
|
||||||
|
|
||||||
- name: Load environment variables from .env
|
|
||||||
run: |
|
|
||||||
set -a
|
|
||||||
source env/.env
|
|
||||||
set +a
|
|
||||||
# Export all variables to GITHUB_ENV
|
|
||||||
while IFS= read -r line; do
|
|
||||||
if [[ $line =~ ^[A-Za-z_][A-Za-z0-9_]*= ]]; then
|
|
||||||
echo "$line" >> $GITHUB_ENV
|
|
||||||
fi
|
|
||||||
done < env/.env
|
|
||||||
|
|
||||||
- name: Unlock login keychain
|
- name: Unlock login keychain
|
||||||
run: |
|
run: |
|
||||||
@@ -51,24 +27,7 @@ jobs:
|
|||||||
flutter pub run build_runner build --delete-conflicting-outputs
|
flutter pub run build_runner build --delete-conflicting-outputs
|
||||||
cd ios
|
cd ios
|
||||||
pod update
|
pod update
|
||||||
# Install/update fastlane
|
fastlane beta
|
||||||
bundle install
|
|
||||||
# Retry logic for fastlane upload
|
|
||||||
for i in {1..3}; do
|
|
||||||
echo "Attempt $i of 3 for fastlane upload"
|
|
||||||
if bundle exec fastlane beta; then
|
|
||||||
echo "Fastlane upload successful on attempt $i"
|
|
||||||
break
|
|
||||||
else
|
|
||||||
echo "Fastlane upload failed on attempt $i"
|
|
||||||
if [ $i -eq 3 ]; then
|
|
||||||
echo "All attempts failed"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo "Waiting 30 seconds before retry..."
|
|
||||||
sleep 30
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
env:
|
env:
|
||||||
LANG: en_US.UTF-8
|
LANG: en_US.UTF-8
|
||||||
LC_ALL: en_US.UTF-8
|
LC_ALL: en_US.UTF-8
|
||||||
|
|||||||
@@ -20,36 +20,8 @@ platform :ios do
|
|||||||
lane :beta do
|
lane :beta do
|
||||||
match(type: "appstore", readonly: true)
|
match(type: "appstore", readonly: true)
|
||||||
increment_build_number(xcodeproj: "Runner.xcodeproj")
|
increment_build_number(xcodeproj: "Runner.xcodeproj")
|
||||||
build_app(
|
build_app(workspace: "Runner.xcworkspace", scheme: "Runner", export_method: "app-store", codesigning_identity: "Apple Distribution")
|
||||||
workspace: "Runner.xcworkspace",
|
|
||||||
scheme: "Runner",
|
|
||||||
export_method: "app-store",
|
|
||||||
codesigning_identity: "Apple Distribution",
|
|
||||||
xcargs: "--dart-define=HIDE_PLANS=true"
|
|
||||||
)
|
|
||||||
app_store_connect_api_key(key_id: "325JS9JCZH", issuer_id: "dfa27d1d-2bb8-4d4d-847e-0b32f9b880b3", key_filepath: "./AuthKey.p8")
|
app_store_connect_api_key(key_id: "325JS9JCZH", issuer_id: "dfa27d1d-2bb8-4d4d-847e-0b32f9b880b3", key_filepath: "./AuthKey.p8")
|
||||||
|
upload_to_testflight
|
||||||
# Try the newer upload method first, fallback to the older one
|
|
||||||
begin
|
|
||||||
upload_to_app_store_connect(
|
|
||||||
api_key_path: "./AuthKey.p8",
|
|
||||||
api_key_id: "325JS9JCZH",
|
|
||||||
api_issuer_id: "dfa27d1d-2bb8-4d4d-847e-0b32f9b880b3",
|
|
||||||
skip_metadata: true,
|
|
||||||
skip_screenshots: true,
|
|
||||||
precheck_include_in_app_purchases: false
|
|
||||||
)
|
|
||||||
rescue => e
|
|
||||||
UI.message("upload_to_app_store_connect failed, trying upload_to_testflight: #{e.message}")
|
|
||||||
upload_to_testflight(
|
|
||||||
skip_waiting_for_build_processing: true,
|
|
||||||
skip_submission: true,
|
|
||||||
reject_if_possible: false,
|
|
||||||
precheck_include_in_app_purchases: false,
|
|
||||||
api_key_path: "./AuthKey.p8",
|
|
||||||
api_key_id: "325JS9JCZH",
|
|
||||||
api_issuer_id: "dfa27d1d-2bb8-4d4d-847e-0b32f9b880b3"
|
|
||||||
)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user