Skip to content

Commit 1f861e4

Browse files
author
nahtheol
authored
Update build.yml
1 parent 15a2a1c commit 1f861e4

1 file changed

Lines changed: 21 additions & 1 deletion

File tree

.github/workflows/build.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Flutter iOS Build
33
on:
44
push:
55
branches:
6-
- main # Or your branch name
6+
- main
77
workflow_dispatch:
88

99
jobs:
@@ -23,6 +23,26 @@ jobs:
2323
- name: Install dependencies
2424
run: flutter pub get
2525

26+
- name: Decode and install certificate
27+
env:
28+
CERTIFICATE_BASE64: ${{ secrets.APPLE_CERTIFICATE }}
29+
CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
30+
run: |
31+
echo "$CERTIFICATE_BASE64" | base64 --decode > certificate.p12
32+
security create-keychain -p "" build.keychain
33+
security import certificate.p12 -k build.keychain -P "$CERTIFICATE_PASSWORD" -T /usr/bin/codesign
34+
security list-keychains -s build.keychain
35+
security default-keychain -s build.keychain
36+
security unlock-keychain -p "" build.keychain
37+
security set-keychain-settings
38+
39+
- name: Install provisioning profile
40+
env:
41+
PROFILE_BASE64: ${{ secrets.APPLE_PROVISIONING_PROFILE }}
42+
run: |
43+
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
44+
echo "$PROFILE_BASE64" | base64 --decode > ~/Library/MobileDevice/Provisioning\ Profiles/profile.mobileprovision
45+
2646
- name: Build iOS
2747
run: flutter build ipa --release -t lib/main.dart
2848

0 commit comments

Comments
 (0)