-
Notifications
You must be signed in to change notification settings - Fork 2
69 lines (59 loc) · 1.68 KB
/
common-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
name: Create Release
on:
workflow_call:
inputs:
tag:
required: true
type: string
release_name:
required: true
type: string
server_host:
required: true
type: string
server_port:
required: true
type: string
secrets:
SERVER_SIGN_KEY:
required: true
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Java 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: 3.24.1
- name: Run flutter doctor
run: flutter doctor
- name: Build APK
run: |
flutter build apk --release \
--dart-define=config.server.network.host=${{ inputs.server_host }} \
--dart-define=config.server.network.port=${{ inputs.server_port }} \
--dart-define=config.server.signKey=${{ secrets.SERVER_SIGN_KEY }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ inputs.tag }}
release_name: ${{ inputs.release_name }}
draft: true
prerelease: false
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
file: build/app/outputs/flutter-apk/app-release.apk
asset_name: LeapLedger.apk
tag: ${{ inputs.tag }}
overwrite: true