Skip to content

Commit

Permalink
enable ios workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Predidit committed Aug 14, 2024
1 parent 0ac77e1 commit 41dd7d7
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 2 deletions.
34 changes: 33 additions & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,36 @@
uses: actions/upload-artifact@v4
with:
name: macos_outputs
path: oneAnime_macos_*.dmg
path: oneAnime_macos_*.dmg

flutter-build-ios:
name: "Release for iOS"
runs-on: "macos-latest"
permissions: write-all

steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Extract tag name
run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Echo build progress
run: echo "oneAnime_ios_canary.ipa build progress"
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version-file: pubspec.yaml
- run: flutter pub get
- name: Build IPA
run: |
flutter build ios --release --no-codesign
- name: Create IPA
run: |
mkdir build/ios/iphoneos/Payload
cp -R build/ios/iphoneos/Runner.app build/ios/iphoneos/Payload/Runner.app
zip -q -r oneAnime_ios_canary_no_sign.ipa build/ios/iphoneos/Payload
- name: Upload iOS build
uses: actions/upload-artifact@v4
with:
name: ios_outputs
path: oneAnime_ios_*.ipa
44 changes: 43 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,42 @@
name: macos_outputs
path: oneAnime_macos_*.dmg

flutter-build-ios:
name: "Release for iOS"
runs-on: "macos-latest"
permissions: write-all

steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Extract tag name
run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Echo build progress
run: echo "oneAnime_ios_${{ env.tag }}.ipa build progress"
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version-file: pubspec.yaml
- run: flutter pub get
- name: Build IPA
run: |
flutter build ios --release --no-codesign
- name: Create IPA
run: |
mkdir build/ios/iphoneos/Payload
cp -R build/ios/iphoneos/Runner.app build/ios/iphoneos/Payload/Runner.app
zip -q -r oneAnime_ios_${{ env.tag }}_no_sign.ipa build/ios/iphoneos/Payload
- name: Upload iOS build
uses: actions/upload-artifact@v4
with:
name: ios_outputs
path: oneAnime_ios_*.ipa

release:
name: "Release"
runs-on: "ubuntu-latest"
needs: [flutter-build-windows, flutter-build-android, flutter-build-linux, flutter-build-macos]
needs: [flutter-build-windows, flutter-build-android, flutter-build-linux, flutter-build-macos, flutter-build-ios]
permissions: write-all
steps:
- name: Clone repository
Expand Down Expand Up @@ -222,6 +254,16 @@
- name: Copy macos build file to root
run: cp macos_outputs/* oneAnime_macos_${{ env.tag }}.dmg

- name: Download iOS build file
uses: actions/download-artifact@v4
with:
name: ios_outputs
path: ios_outputs
- name: List files in ios_outputs directory
run: ls -l ios_outputs
- name: Copy ios build file to root
run: cp ios_outputs/* oneAnime_ios_${{ env.tag }}_no_sign.ipa

- name: Download android build file
uses: actions/download-artifact@v4
with:
Expand Down

0 comments on commit 41dd7d7

Please sign in to comment.