Skip to content

Commit 3c84440

Browse files
authored
Merge pull request #79 from fleetbase/patch/profile-release
profile release patches for ios/android release
2 parents ddbc919 + 39fa35d commit 3c84440

File tree

1 file changed

+38
-23
lines changed

1 file changed

+38
-23
lines changed

.github/workflows/profile-release.yml

Lines changed: 38 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,22 @@ jobs:
404404
echo "📋 Current versions:"
405405
grep "ANDROID_VERSION\|IOS_VERSION" ./.env || echo " No version info in .env"
406406
407+
- name: Export .env to runner env (Android)
408+
shell: bash
409+
run: |
410+
echo "🔄 Exporting profile .env → environment"
411+
set -a
412+
source ./.env
413+
set +a
414+
415+
# Also persist into $GITHUB_ENV for all subsequent steps
416+
while IFS='=' read -r key value || [ -n "$key" ]; do
417+
[[ $key =~ ^#.*$ || -z $key ]] && continue
418+
value=$(echo "$value" | sed 's/^"//;s/"$//') # strip surrounding quotes
419+
echo "$key=$value" >> "$GITHUB_ENV"
420+
done < ./.env
421+
echo "✅ Export complete"
422+
407423
- name: Install ImageMagick (Ubuntu)
408424
run: |
409425
sudo apt-get update
@@ -603,16 +619,6 @@ jobs:
603619
# Reuse the region you already configured for AWS creds
604620
echo "MATCH_S3_REGION=${{ secrets.AWS_REGION || 'ap-southeast-1' }}" >> $GITHUB_ENV
605621
606-
- name: Create Fastlane Pluginfile (match storage on S3)
607-
run: |
608-
mkdir -p ios/fastlane
609-
cat > ios/fastlane/Pluginfile <<'EOF'
610-
gem 'fastlane-plugin-match_storage_s3'
611-
EOF
612-
613-
echo "📦 Fastlane Pluginfile created:"
614-
cat ios/fastlane/Pluginfile
615-
616622
- name: Set up iOS authentication
617623
run: |
618624
echo "🔐 Setting up iOS authentication (required for all iOS builds)"
@@ -667,23 +673,32 @@ jobs:
667673
echo "📦 Installing iOS dependencies"
668674
cd ios && pod install --repo-update
669675
670-
- name: Build or Deploy iOS app
676+
- name: Create Gemfile and install Fastlane + plugins
671677
run: |
672678
set -e
673-
cd ios
679+
cat > Gemfile <<'EOF'
680+
source "https://rubygems.org"
681+
gem "fastlane", "~> 2.228"
682+
gem "fastlane-plugin-match_storage_s3"
683+
EOF
674684
675-
# Fastlane core
676-
echo "🚀 Installing Fastlane"
677-
sudo gem install fastlane --no-document
685+
# Optional: speed up / be deterministic
686+
export BUNDLE_PATH="vendor/bundle"
687+
export BUNDLE_JOBS=4
688+
export BUNDLE_RETRY=3
689+
bundle install
678690
679-
# Install plugins from Pluginfile (non-interactive)
680-
echo "🔌 Installing Fastlane plugins from Pluginfile"
681-
fastlane install_plugins
691+
- name: Build or Deploy iOS app
692+
env:
693+
FASTLANE_SKIP_UPDATE_CHECK: '1'
694+
FASTLANE_DISABLE_PROMPTS: '1'
695+
run: |
696+
set -e
697+
cd ios
682698
683699
echo "📋 Available Fastlane lanes:"
684-
fastlane lanes
700+
bundle exec fastlane lanes
685701
686-
# Decide build/deploy path
687702
if [ "${{ needs.detect-release.outputs.deploy }}" = "true" ]; then
688703
echo "🚀 Deploying to App Store Connect"
689704
echo "Profile: ${{ needs.detect-release.outputs.profile }}"
@@ -692,15 +707,15 @@ jobs:
692707
case "${{ needs.detect-release.outputs.release_track }}" in
693708
"production")
694709
echo "📱 Deploying to App Store for review"
695-
fastlane deploy_appstore
710+
bundle exec fastlane deploy_appstore
696711
;;
697712
"internal"|"alpha"|"beta"|*)
698713
echo "📱 Deploying to TestFlight"
699-
fastlane deploy_testflight
714+
bundle exec fastlane deploy_testflight
700715
;;
701716
esac
702717
703-
echo "✅ Successfully invoked Fastlane deployment"
718+
echo "✅ Fastlane finished"
704719
else
705720
echo "🔨 Building iOS app (no deployment)"
706721

0 commit comments

Comments
 (0)