-
Notifications
You must be signed in to change notification settings - Fork 5
100 lines (83 loc) · 2.62 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
90
91
92
93
94
95
96
97
98
99
100
name: Release Workflow
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
build-release-files:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- run: mkdir android/keystore
- name: Decode Keystore
id: decode_keystore
uses: timheuer/base64-to-file@v1
with:
fileName: 'keystore.jks'
fileDir: 'android/keystore/'
encodedString: ${{ secrets.KEYSTORE }}
- name: Install Java
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.13.4'
channel: 'stable'
- run: flutter --version
- run: flutter pub get
- run: flutter packages pub run build_runner build --delete-conflicting-outputs
# - run: flutter test
- name: Build AAR
env:
ALIAS: ${{ secrets.KEY_ALIAS }}
PASS: ${{ secrets.KEY_PASS }}
run: flutter build appbundle --release
- run: flutter build apk --release
env:
ALIAS: ${{ secrets.KEY_ALIAS }}
PASS: ${{ secrets.KEY_PASS }}
- run: flutter build web --release
- run: zip -r pwa.zip build/web
- run: flutter build macos --release
- name: Move files to root
run: |
mv build/app/outputs/apk/release/app-release.apk app-release.apk
mv build/app/outputs/bundle/release/app-release.aab app-release.aab
mv build/macos/Build/Products/Release/Ambush\ Invoice\ Generator.app Invoice.app
- name: Zip macos.app
run: zip -r macos.zip Invoice.app
- name: Archive Files
uses: actions/upload-artifact@v2
with:
name: release-artifacts
path: |
app-release.apk
app-release.aab
pwa.zip
macos.zip
release:
needs: build-release-files
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Download Artifacts
uses: actions/download-artifact@v2
with:
name: release-artifacts
path: ./downloaded-artifacts
- run: ls -la ./downloaded-artifacts
- name: Release
uses: docker://antonyurchenko/git-release:v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: |
./downloaded-artifacts/app-release.apk
./downloaded-artifacts/app-release.aab
./downloaded-artifacts/pwa.zip
./downloaded-artifacts/macos.zip