-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (75 loc) · 2.81 KB
/
ios_build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Build and Release iOS App
on:
push:
branches:
- main
jobs:
build-ios:
name: Build iOS app
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v3
with:
distribution: 'zulu' # Use a supported Java distribution
java-version: '12.0'
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.16.0'
channel: 'stable' # Can be 'beta', 'dev', or 'master'
- name: Install dependencies
run: flutter pub get
- name: Build iOS app
run: flutter build ios --release --no-codesign
# '--no-codesign' is used for building without code signing.
# For actual distribution, proper code signing is required.
########################################################
## Package the app as an .ipa and create a release ##
########################################################
- name: Package .ipa file
run: |
mkdir Payload
cp -r build/ios/iphoneos/Runner.app Payload/Runner.app
zip -r app.ipa Payload
# This packages the Runner.app into an .ipa file
- uses: ncipollo/release-action@v1
with:
name: "Automated iOS Release"
artifacts: "app.ipa"
allowUpdates: "true"
generateReleaseNotes: false
tag: "automated"
body: |
This is an automated release, triggered by a recent push.
This may or may not be stable, so please have a look at the stable release(s).
Android-Build-and-Release:
name: Testing build for android
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'zulu' # See 'Supported distributions' for available options
java-version: '12.0'
- uses: subosito/flutter-action@v2
with:
channel: 'stable' # or: 'beta', 'dev' or 'master'
- name: Running pub get to fetch dependencies
run: flutter pub get
- name: Building for android
run: flutter build apk
###################################################
## Release the built apk as an automated release ##
###################################################
- uses: ncipollo/release-action@v1
with:
name: "Automated Android Release"
artifacts: "./build/app/outputs/flutter-apk/app-release.apk"
allowUpdates: "true"
generateReleaseNotes: false
tag: "automated"
body: |
This is an automated release, triggered by a recent push.
This may or may not be stable, so please have a look at the stable release(s).
env:
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}