-
-
Notifications
You must be signed in to change notification settings - Fork 1
73 lines (60 loc) · 1.88 KB
/
publish-apk.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
name: APK Build and Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
env:
PYTHON_VERSION: 3.12.2
FLUTTER_VERSION: 3.24.0
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-apk.txt
- name: Setup Flutter ${{ env.FLUTTER_VERSION }}
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
- name: Setup Java JDK
uses: actions/[email protected]
with:
distribution: 'temurin'
java-version: '21'
- name: Flet Build APK
run: |
flutter config --no-analytics
flet build apk -v --include-packages flet_permission_handler
- name: Get Version and Set Release Metadata
id: get_version
shell: bash
run: |
VERSION=${GITHUB_REF#refs/tags/v}
FILENAME="Singles-Sorter-$VERSION_CLEAN.apk"
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
echo "VERSION_CLEAN=$VERSION_CLEAN" >> $GITHUB_OUTPUT
echo "FILENAME=$FILENAME" >> $GITHUB_OUTPUT
echo "RELEASE_TITLE=מסדר הסינגלים $VERSION" >> $GITHUB_OUTPUT
- name: Rename APK File
run: |
mv build/apk/*.apk build/apk/${{ steps.get_version.outputs.FILENAME }}
- name: Create Draft Release
uses: softprops/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
name: ${{ steps.get_version.outputs.RELEASE_TITLE }}
draft: true
prerelease: true
files: |
build/apk/${{ steps.get_version.outputs.FILENAME }}