Skip to content

Package Application with PyInstaller #15

Package Application with PyInstaller

Package Application with PyInstaller #15

Workflow file for this run

name: Package Application with PyInstaller
on: workflow_dispatch
jobs:
build:
strategy:
fail-fast: false
matrix:
python-version: ["3.12"]
poetry-version: ["1.8.3"]
os: [ubuntu-22.04, macos-latest, windows-latest]
defaults:
run:
shell: bash
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
# Needed for poetry dynamic versioning.
# If possible, would be best to fetch till last git tag instead of entire history.
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@972a0e78ffdebf9e98f6fe404b77831716cdd4aa
with:
version: ${{ matrix.poetry-version }}
virtualenvs-create: true
virtualenvs-in-project: true
virtualenvs-path: .venv
installer-parallel: true
plugins: |
poetry-pyinstaller-plugin
poetry-dynamic-versioning[plugin]
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies if not cached
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root --with dev
- name: Install project
run: poetry install --no-interaction
- name: Build package
run: |
source $VENV
poetry build --format pyinstaller
- uses: actions/upload-artifact@v4
with:
name: pymusiclooper-${{ matrix.os }}
path: |
dist/pyinstaller/**/*
!dist/pyinstaller/**/.specs