update workflow
This commit is contained in:
parent
3ae2e93531
commit
926e45170d
102
.github/workflows/ios.yml
vendored
102
.github/workflows/ios.yml
vendored
@ -1,10 +1,13 @@
|
||||
name: Build iOS IPA
|
||||
name: Build & Deploy iOS to TestFlight
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-ios:
|
||||
build-and-deploy:
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
@ -14,37 +17,94 @@ jobs:
|
||||
- name: Setup Flutter
|
||||
uses: subosito/flutter-action@v2
|
||||
with:
|
||||
flutter-version: "3.41.9"
|
||||
|
||||
- name: Upgrade Firebase for Xcode 26 compatibility
|
||||
run: |
|
||||
sed -i '' 's/firebase_core: 2.32.0/firebase_core: ^3.13.1/' pubspec.yaml
|
||||
sed -i '' 's/firebase_messaging: 14.7.10/firebase_messaging: ^15.2.5/' pubspec.yaml
|
||||
sed -i '' 's/firebase_crashlytics: \^3\.[0-9]*\.[0-9]*/firebase_crashlytics: ^5.2.0/' pubspec.yaml
|
||||
flutter-version: "3.29.3"
|
||||
channel: "stable"
|
||||
cache: true
|
||||
|
||||
- name: Install Dependencies
|
||||
run: flutter pub get
|
||||
|
||||
- name: Install CocoaPods
|
||||
# ── Code Signing Setup ──────────────────────────────────────────────────
|
||||
|
||||
- name: Install Apple Certificate
|
||||
env:
|
||||
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
|
||||
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
|
||||
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
|
||||
run: |
|
||||
# Decode certificate to file
|
||||
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
|
||||
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH
|
||||
|
||||
# Create temporary keychain
|
||||
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
|
||||
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
|
||||
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
|
||||
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
|
||||
|
||||
# Import certificate to keychain
|
||||
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A \
|
||||
-t cert -f pkcs12 -k $KEYCHAIN_PATH
|
||||
security set-key-partition-list -S apple-tool:,apple: \
|
||||
-s -k "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
|
||||
security list-keychain -d user -s $KEYCHAIN_PATH
|
||||
|
||||
- name: Install Provisioning Profile
|
||||
env:
|
||||
BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_BASE64 }}
|
||||
run: |
|
||||
PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision
|
||||
echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode -o $PP_PATH
|
||||
|
||||
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
|
||||
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
|
||||
|
||||
# ── CocoaPods ───────────────────────────────────────────────────────────
|
||||
|
||||
- name: Install CocoaPods Dependencies
|
||||
run: |
|
||||
cd ios
|
||||
rm -f Podfile.lock
|
||||
pod install --repo-update
|
||||
|
||||
- name: Build iOS (no codesign)
|
||||
run: flutter build ios --release --no-codesign
|
||||
# ── Build ───────────────────────────────────────────────────────────────
|
||||
|
||||
- name: Create IPA from app bundle
|
||||
- name: Build iOS IPA
|
||||
env:
|
||||
BUNDLE_ID: ${{ secrets.BUNDLE_ID }}
|
||||
TEAM_ID: ${{ secrets.TEAM_ID }}
|
||||
run: |
|
||||
mkdir -p build/ios/ipa
|
||||
cd build/ios/Release-iphoneos
|
||||
mkdir -p Payload
|
||||
cp -r Runner.app Payload/
|
||||
zip -r ../ipa/Runner.ipa Payload
|
||||
echo "IPA created at build/ios/ipa/Runner.ipa"
|
||||
flutter build ipa --release \
|
||||
--export-options-plist=ios/ExportOptions.plist
|
||||
|
||||
- name: Upload IPA Artifact
|
||||
# ── Upload to TestFlight ────────────────────────────────────────────────
|
||||
|
||||
- name: Upload to TestFlight via Transporter
|
||||
env:
|
||||
APPLE_ID: ${{ secrets.APPLE_ID }}
|
||||
APP_SPECIFIC_PASSWORD: ${{ secrets.APP_SPECIFIC_PASSWORD }}
|
||||
run: |
|
||||
xcrun altool --upload-app \
|
||||
--type ios \
|
||||
--file "build/ios/ipa/*.ipa" \
|
||||
--username "$APPLE_ID" \
|
||||
--password "$APP_SPECIFIC_PASSWORD" \
|
||||
--verbose
|
||||
|
||||
# ── Cleanup ─────────────────────────────────────────────────────────────
|
||||
|
||||
- name: Clean Up Keychain and Provisioning Profile
|
||||
if: ${{ always() }}
|
||||
run: |
|
||||
security delete-keychain $RUNNER_TEMP/app-signing.keychain-db || true
|
||||
rm -f ~/Library/MobileDevice/Provisioning\ Profiles/build_pp.mobileprovision || true
|
||||
|
||||
# ── Artifact (opsional, untuk debugging) ────────────────────────────────
|
||||
|
||||
- name: Upload IPA as Artifact
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ios-ipa
|
||||
path: build/ios/ipa/Runner.ipa
|
||||
path: build/ios/ipa/*.ipa
|
||||
retention-days: 7
|
||||
|
||||
36
ios/ExportOptions.plist
Normal file
36
ios/ExportOptions.plist
Normal file
@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<!-- Ganti "app-store-connect" jika perlu: ad-hoc, enterprise, development -->
|
||||
<key>method</key>
|
||||
<string>app-store-connect</string>
|
||||
|
||||
<!-- Team ID dari Apple Developer account -->
|
||||
<key>teamID</key>
|
||||
<string>5TRC3M8UZG</string>
|
||||
|
||||
<!-- Signing style: manual (pakai provisioning profile eksplisit) -->
|
||||
<key>signingStyle</key>
|
||||
<string>manual</string>
|
||||
|
||||
<!-- Provisioning profiles: key = bundle ID, value = nama profile -->
|
||||
<key>provisioningProfiles</key>
|
||||
<dict>
|
||||
<key>com.apskel.enaklo</key>
|
||||
<string>Enaklo Owner App Store</string>
|
||||
</dict>
|
||||
|
||||
<key>stripSwiftSymbols</key>
|
||||
<true/>
|
||||
|
||||
<key>uploadBitcode</key>
|
||||
<false/>
|
||||
|
||||
<key>uploadSymbols</key>
|
||||
<true/>
|
||||
|
||||
<key>compileBitcode</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
||||
38
pubspec.lock
38
pubspec.lock
@ -213,10 +213,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: characters
|
||||
sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803
|
||||
sha256: faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.4.0"
|
||||
version: "1.4.1"
|
||||
checked_yaml:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -881,26 +881,26 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: leak_tracker
|
||||
sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0"
|
||||
sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "10.0.9"
|
||||
version: "11.0.2"
|
||||
leak_tracker_flutter_testing:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: leak_tracker_flutter_testing
|
||||
sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
|
||||
sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.9"
|
||||
version: "3.0.10"
|
||||
leak_tracker_testing:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: leak_tracker_testing
|
||||
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
|
||||
sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.1"
|
||||
version: "3.0.2"
|
||||
line_icons:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -937,26 +937,26 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: matcher
|
||||
sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
|
||||
sha256: dc0b7dc7651697ea4ff3e69ef44b0407ea32c487a39fff6a4004fa585e901861
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.12.17"
|
||||
version: "0.12.19"
|
||||
material_color_utilities:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: material_color_utilities
|
||||
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
|
||||
sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.11.1"
|
||||
version: "0.13.0"
|
||||
meta:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: meta
|
||||
sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
|
||||
sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.16.0"
|
||||
version: "1.17.0"
|
||||
mime:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -1526,10 +1526,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: test_api
|
||||
sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd
|
||||
sha256: "8161c84903fd860b26bfdefb7963b3f0b68fee7adea0f59ef805ecca346f0c7a"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.7.4"
|
||||
version: "0.7.10"
|
||||
time:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -1662,10 +1662,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vector_math
|
||||
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
|
||||
sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.4"
|
||||
version: "2.2.0"
|
||||
vm_service:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -1747,5 +1747,5 @@ packages:
|
||||
source: hosted
|
||||
version: "3.1.3"
|
||||
sdks:
|
||||
dart: ">=3.8.1 <4.0.0"
|
||||
dart: ">=3.9.0-0 <4.0.0"
|
||||
flutter: ">=3.29.0"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user