-
Notifications
You must be signed in to change notification settings - Fork 1
93 lines (79 loc) · 2.47 KB
/
create_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
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
name: Create Release
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
release:
types: [ published ]
jobs:
build-apk:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '17'
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.27.1'
- name: Configure build
run: flutter clean && flutter pub get
- name: Build APK
env:
KEY_JKS: ${{ secrets.KEY_JKS }}
KEY_PASSWORD: ${{ secrets.ALIAS_PASSWORD }}
ALIAS_PASSWORD: ${{ secrets.KEY_PASSWORD }}
run: base64 -d <<< $KEY_JKS > ./android/app/release-key.jks && flutter build apk --release -v
- name: Rename APK
run: mv ./build/app/outputs/flutter-apk/app-release.apk IronFlow.apk
- name: Upload APK
uses: actions/upload-artifact@v4
with:
name: IronFlow-APK
path: IronFlow.apk
if-no-files-found: error
- name: Upload APK to release
if: ${{ github.event_name == 'release' }}
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.CI_TOKEN }}
file: IronFlow.apk
file_glob: true
tag: ${{ github.ref }}
overwrite: true
build-ipa:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.27.1'
architecture: x64
- name: Build iOS
run: |
flutter pub get
flutter build ios --release --no-codesign
- name: Create IPA
run: |
mkdir ./Payload/
mv ./build/ios/iphoneos/Runner.app/ ./Payload
zip -qq -r -9 ./IronFlow.zip ./Payload
mv IronFlow.zip IronFlow.ipa
- name: Upload IPA
uses: actions/upload-artifact@v4
with:
name: IronFlow-IPA
path: ./IronFlow.ipa
if-no-files-found: error
- name: Upload IPA to release
if: ${{ github.event_name == 'release' }}
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.CI_TOKEN }}
file: ./IronFlow.ipa
file_glob: true
tag: ${{ github.ref }}
overwrite: true