Skip to content

Commit bc26dd1

Browse files
committed
Create main.yml
1 parent d07b4cd commit bc26dd1

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

.github/workflows/main.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: "Build & Release"
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
build:
11+
name: Build & Release
12+
runs-on: macos-latest
13+
14+
steps:
15+
- name: Checkout Repository
16+
uses: actions/checkout@v3
17+
18+
- name: Set Up Java
19+
uses: actions/[email protected]
20+
with:
21+
distribution: 'oracle'
22+
java-version: '19.0.2'
23+
24+
- name: Set Up Flutter
25+
uses: subosito/flutter-action@v2
26+
with:
27+
flutter-version: '3.16.3'
28+
channel: 'stable'
29+
30+
- name: Set up debug keystore
31+
run: |
32+
rm -f ~/.android/debug.keystore
33+
keytool -genkeypair \
34+
-alias androiddebugkey \
35+
-keypass android \
36+
-keystore ~/.android/debug.keystore \
37+
-storepass android \
38+
-dname 'CN=Android Debug,O=Android,C=US' \
39+
-keyalg 'RSA' \
40+
-keysize 2048 \
41+
-validity 10000
42+
43+
- name: Quality checks monorepo
44+
run: |
45+
./bin/quality_checks.sh
46+
47+
- name: Android native tests
48+
run: |
49+
#!/bin/bash -ex
50+
cd example/android && ls && ./gradlew detekt && ./gradlew testDebugUnitTest
51+
52+
- name: Build android app
53+
run: |
54+
cd example && flutter build apk --debug
55+
56+
- name: Build iOS app
57+
run: |
58+
find . -name "Podfile" -execdir pod install \;
59+
cd example && flutter build ios --debug --no-codesign
60+
61+
- name: Upload Artifacts
62+
uses: actions/upload-artifact@v2
63+
with:
64+
name: Releases
65+
path: |
66+
example/build/**/outputs/**/*.apk
67+
example/build/**/outputs/**/mapping.txt
68+
eexample/build/ios/ipa/*.ipa

0 commit comments

Comments
 (0)