Skip to content

Commit 2b66cf5

Browse files
authored
Enhance CI workflow for iOS build and release
Added permissions and steps to zip iOS build and create release.
1 parent 8e91ae7 commit 2b66cf5

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/main.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Flutter Build
22

3+
permissions:
4+
contents: write
5+
36
on:
47
push:
58
branches: [ "main" ]
@@ -66,3 +69,20 @@ jobs:
6669
with:
6770
name: release-ios
6871
path: build/ios/iphoneos/Runner.app
72+
73+
# 1. Zip the iOS App (Required because Releases can only handle files, not folders)
74+
- name: Zip iOS Build
75+
run: |
76+
cd build/ios/iphoneos
77+
zip -r release-ios.zip Runner.app
78+
echo "IOS_ZIP_PATH=build/ios/iphoneos/release-ios.zip" >> $GITHUB_ENV
79+
80+
# 2. Create Release and Upload Files
81+
- name: Create Release
82+
uses: softprops/action-gh-release@v2
83+
with:
84+
files: |
85+
build/app/outputs/flutter-apk/app-release.apk
86+
${{ env.IOS_ZIP_PATH }}
87+
env:
88+
GITHUB_TOKEN: ${{ secrets.TOKEN }}

0 commit comments

Comments
 (0)