Skip to content

הוספת חבילת FLET לדרישות #2

הוספת חבילת FLET לדרישות

הוספת חבילת FLET לדרישות #2

Workflow file for this run

name: APK Build
on:
push:
branches:
- dev
paths:
- '.github/workflows/apk-build.yml'
tags:
- '*'
# Allows you to run this workflow manually from the Actions tab of the repository
workflow_dispatch:
env:
# https://flet.dev/docs/publish#versioning
BUILD_NUMBER: 1
BUILD_VERSION: 1.0.0
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.txt
- name: Setup Flutter ${{ env.FLUTTER_VERSION }}
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
- name: Setup Java JDK
uses: actions/setup-java@v4.2.1
with:
distribution: 'temurin' # See https://github.com/marketplace/actions/setup-java-jdk#supported-distributions for available options
java-version: '21'
- name: Flet Build APK
run: |
flutter config --no-analytics # disable flutter analytics
flet build apk -v # adapt the command to your needs - https://flet.dev/docs/publish
- name: Upload APK Artifact
uses: actions/upload-artifact@v4.3.4 # https://github.com/marketplace/actions/upload-a-build-artifact
with:
name: apk-build-artifact # the name of the artifact
path: build/apk # location of Flet build output
if-no-files-found: error # Fail the action with an error message if no files are found
overwrite: false # If true, an artifact with a matching name will be deleted before a new one is uploaded. If false, the action will fail if an artifact for the given name already exists. Does not fail if the artifact does not exist.