Add ios workflow

This commit is contained in:
2024-02-06 13:03:19 +08:00
parent c5e20d8565
commit 1759bf3297
5 changed files with 59 additions and 0 deletions

View File

@@ -3,6 +3,7 @@ on:
push:
branches: ["*"]
paths-ignore:
- '.github/workflows/ios.yml'
- '.github/workflows/linux.yml'
- '.github/workflows/web.yml'
- '.github/workflows/windows.yml'

55
.github/workflows/ios.yml vendored Normal file
View File

@@ -0,0 +1,55 @@
name: iOS Build
on:
push:
branches: ["*"]
paths-ignore:
- '.github/workflows/android.yml'
- '.github/workflows/linux.yml'
- '.github/workflows/web.yml'
- '.github/workflows/windows.yml'
- 'android/**'
- 'linux/**'
- 'macos/**'
- 'web/**'
- 'windows/**'
- '.gitignore'
- '.gitmodules'
- 'README.md'
- 'LICENSE'
jobs:
ios:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- name: Import keychain
uses: apple-actions/import-codesign-certs@v2
with:
p12-file-base64: ${{ secrets.P12_FILE_BASE64 }}
p12-password: ${{ secrets.P12_PASSWORD }}
- name: Install provisoning profile
env:
PROVISIONING_PROFILE: ${{ secrets.PROVISIONING_PROFILE }}
run: |
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
echo "${PROVISIONING_PROFILE}" | base64 --decode > ~/Library/MobileDevice/Provisioning\ Profiles/ehf_dev.mobileprovision
- name: Build
run: flutter build ios --release
- name: Clean up
run: |
rm -rf ~/Library/MobileDevice/Provisioning\ Profiles/ehf_dev.mobileprovision
- name: Archive
run: |
cd build/ios/iphoneos
mkdir Payload
mv Runner.app Payload
zip -r app.ipa Payload
- name: Upload
uses: actions/upload-artifact@v4
with:
name: app
path: build/ios/iphoneos/app.ipa

View File

@@ -4,6 +4,7 @@ on:
branches: ["*"]
paths-ignore:
- '.github/workflows/android.yml'
- '.github/workflows/ios.yml'
- '.github/workflows/web.yml'
- '.github/workflows/windows.yml'
- 'android/**'

View File

@@ -4,6 +4,7 @@ on:
branches: ["*"]
paths-ignore:
- '.github/workflows/android.yml'
- '.github/workflows/ios.yml'
- '.github/workflows/linux.yml'
- '.github/workflows/windows.yml'
- 'android/**'

View File

@@ -4,6 +4,7 @@ on:
branches: ["*"]
paths-ignore:
- '.github/workflows/android.yml'
- '.github/workflows/ios.yml'
- '.github/workflows/linux.yml'
- '.github/workflows/web.yml'
- 'android/**'