-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (42 loc) · 1.74 KB
/
release.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
name: build and release
on:
push:
branches: [ "main" ]
jobs:
build:
name: build and release
runs-on: macos-latest
steps:
- name: checkout source
uses: actions/checkout@v4
- name: set up flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version-file: pubspec.yaml
# cache: true
# cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:"
# cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:"
# pub-cache-key: "flutter-pub:os:-:channel:-:version:-:arch:-:hash:" get dependencies
# pub-cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:"
- name: print flutter version
run: flutter --version
- name: get dependencies
run: flutter pub get
- name: test
run: flutter test
- name: setup firebase
run: |
echo "${{ secrets.FIREBASE_OPTIONS_DART }}" | base64 -d >> ./lib/firebase_options.dart
echo "${{ secrets.GOOGLE_SERVICE_JSON }}" | base64 -d >> ./android/app/google-services.json
- name: prepare release signing
run: |
echo "${{ secrets.RELEASE_KEYSTORE }}" | base64 -d >> ./android/app/chrono-sheet.jks
echo "storeFile=chrono-sheet.jks" >> ./android/key.properties
echo "storePassword=${{ secrets.RELEASE_KEYSTORE_PASSWORD }}" >> ./android/key.properties
echo "keyPassword=${{ secrets.RELEASE_KEYSTORE_PASSWORD }}" >> ./android/key.properties
echo "keyAlias=${{ secrets.RELEASE_KEYSTORE_KEY }}" >> ./android/key.properties
- name: buld apk
run: flutter build apk --release
- name: build app bundle
run: flutter build appbundle