Skip to content

Commit

Permalink
פרסום אפליקצייה ניסיוני
Browse files Browse the repository at this point in the history
  • Loading branch information
NHLOCAL committed Dec 25, 2024
1 parent 1084bc6 commit 8b867da
Showing 1 changed file with 75 additions and 0 deletions.
75 changes: 75 additions & 0 deletions .github/workflows/publish-apk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: APK Build and Release

on:
push:
branches:
- dev
- main
tags:
- '*'

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/}
FILENAME="Singles-Sorter-$VERSION.apk"
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
echo "FILENAME=$FILENAME" >> $GITHUB_OUTPUT
echo "RELEASE_TITLE=APK Build Release $VERSION" >> $GITHUB_OUTPUT
- name: Rename APK File
run: |
mv build/apk/*.apk build/apk/${{ steps.get_version.outputs.FILENAME }}
- name: Create Release
uses: softprops/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get_version.outputs.VERSION }}
name: ${{ steps.get_version.outputs.RELEASE_TITLE }}
draft: false
prerelease: false
files: |
build/apk/${{ steps.get_version.outputs.FILENAME }}

0 comments on commit 8b867da

Please sign in to comment.