61 lines
1.5 KiB
YAML
61 lines
1.5 KiB
YAML
# .github/workflows/release.yml
|
|
name: Release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- os: ubuntu-latest
|
|
asset_name: android-file-handler-linux
|
|
- os: windows-latest
|
|
asset_name: android-file-handler-windows.exe
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install AppImage dependencies (Linux)
|
|
if: matrix.os == 'ubuntu-latest'
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install -y fuse libfuse2 curl imagemagick
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.12'
|
|
|
|
- name: Install Poetry
|
|
uses: snok/install-poetry@v1
|
|
with:
|
|
version: latest
|
|
virtualenvs-create: true
|
|
virtualenvs-in-project: true
|
|
|
|
- name: Install dependencies
|
|
run: poetry install
|
|
|
|
- name: Build AppImage (Linux)
|
|
if: matrix.os == 'ubuntu-latest'
|
|
env:
|
|
CI_CD: true
|
|
run: |
|
|
chmod +x scripts/build_AppImage.sh
|
|
./scripts/build_AppImage.sh
|
|
|
|
- name: Build executable (Windows)
|
|
if: matrix.os == 'windows-latest'
|
|
run: |
|
|
poetry lock
|
|
poetry install
|
|
poetry run pyinstaller --onefile src/main.py --distpath dist --name android-file-handler-windows
|
|
|
|
- name: Create Release
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
files: dist/${{ matrix.asset_name }}
|
|
generate_release_notes: true |