-
Notifications
You must be signed in to change notification settings - Fork 0
113 lines (91 loc) · 2.98 KB
/
release_and_upload.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: 'tagged-release'
on:
push:
tags:
- "v*"
jobs:
android:
name: 'build android apk'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '17'
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Decode Keystore
id: decode_keystore
uses: timheuer/base64-to-file@v1
with:
fileName: 'keystore/aniflow-keystore.jks'
encodedString: ${{ secrets.KEYSTORE }}
- run: flutter pub get
# - name: build bundle
# run: flutter build appbundle --flavor limited
# env:
# SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
# SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
# SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
- name: build android app
run: flutter build apk --split-per-abi --flavor full
env:
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
- name: Upload APK Artifact
uses: actions/upload-artifact@v3
with:
name: android-release
path: build/app/outputs/flutter-apk/*
macos:
name: 'build macos app'
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Install create-dmg
run: brew install create-dmg
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- run: flutter pub get
- name: build macos app
run: flutter build macos
- name: Create .dmg
run: |
create-dmg build/macos/Build/Products/Release/aniflow.dmg build/macos/Build/Products/Release/aniflow.app
- name: Upload Macos app Artifact
uses: actions/upload-artifact@v3
with:
name: macos-release
path: build/macos/Build/Products/Release/aniflow.dmg
release:
name: Create GitHub Release
runs-on: ubuntu-latest
needs: [android, macos]
steps:
- name: Download Android Artifact
uses: actions/download-artifact@v3
with:
name: android-release
- name: Download Macos Artifact
uses: actions/download-artifact@v3
with:
name: macos-release
- name: Create Release
uses: ncipollo/release-action@v1
with:
tag: ${{ github.ref_name }}
name: Release ${{ github.ref_name }}
token: ${{ secrets.TOKEN }}
artifacts: |
app-arm64-v8a-full-release.apk
app-armeabi-v7a-full-release.apk
app-x86_64-full-release.apk
aniflow.dmg