Skip to content

Workflow file for this run

name: Pack Flet Application
on:
push:
branches:
- main
paths:
- '**.py'
tags:
- "v*"
pull_request:
branches:
- main
workflow_dispatch: ~
permissions:
contents: write
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
cache: "pip"
- name: Install dependencies
run:
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Pack Flet Application
run: flet pack gui.py --icon imgs/icon_m.png --uac-admin --add-data "utils/models;utils/models" -y
- name: Pyinstaller Application
run: |
pyinstaller --uac-admin -F --i imgs/icon.png -w notif.py
- name: Move assets to dist directory
run: |
xcopy imgs dist\imgs /I /E
xcopy actions dist\actions /I /E
xcopy info_example.yml dist
xcopy info_example_old.yml dist
xcopy README.md dist
ren dist AutoSimulatedUniverse
- name: Create zip archive
if: startsWith(github.ref, 'refs/tags/')
run: |
$files = Get-ChildItem -Path AutoSimulatedUniverse
Compress-Archive -Path $files.FullName -DestinationPath "AutoSimulatedUniverse_${{ github.ref_name }}.zip" -Force
- name: Create release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
name: ${{ github.ref_name }}
files: |
AutoSimulatedUniverse_${{ github.ref_name }}.zip
prerelease: true
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: AutoSimulatedUniverse
path: AutoSimulatedUniverse