-
Notifications
You must be signed in to change notification settings - Fork 1
89 lines (73 loc) · 2.25 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
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
name: Releases
on:
push:
branches:
- master
jobs:
build-cross-platform-and-release:
runs-on: macos-latest
steps:
- name: Set up Checkout
uses: actions/checkout@v3
- name: setup-cocoapods
uses: maxim-lobanov/setup-cocoapods@v1
with:
version: latest
- name: Set up Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Setup JDK
uses: actions/setup-java@v1
with:
java-version: 17
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
cache: true
channel: "stable"
- name: Cache
uses: actions/cache@v2
with:
path: ~/.pub-cache
key: ${{ runner.os }}-flutter-${{ hashFiles('**/pubspec.lock') }}
restore-keys: ${{ runner.os }}-flutter-
- name: Get Dependency
run: |
flutter pub get
# flutter pub deps
- name: Run build_runner
run: dart run build_runner build
- name: Build Android
run: |
flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi
flutter build apk --release
- name: Build iOS
run: |
flutter build ios --release --no-codesign
cd build/ios/iphoneos
mkdir Payload
cd Payload
ln -s ../Runner.app
cd ..
zip -r app.ipa Payload
- name: Generate Changelog
id: changelog
uses: TriPSs/conventional-changelog-action@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Release to Github
uses: softprops/action-gh-release@v1
if: ${{ steps.changelog.outputs.skipped == 'false' }}
with:
files: |
build/app/outputs/flutter-apk/*.apk
build/ios/iphoneos/app.ipa
# build/macos/Build/Products/Release/yoyo.mac.zip
# yy-linux-x86_64.tar.gz
# yy-windows.zip
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ steps.changelog.outputs.tag }}
body: ${{ steps.changelog.outputs.clean_changelog }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}