Skip to content

Package Application #16

Package Application

Package Application #16

Workflow file for this run

name: Package Application
on:
workflow_dispatch:
inputs:
version:
description: "Version (semantic)"
required: true
default: "X.X"
spec:
description: "Spec file"
required: true
default: "almufarrigh.spec"
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ 'windows-latest', 'macos-latest', 'ubuntu-latest' ]
python-version: [ "3.10" ]
poetry-version: [ "1.6.1" ]
variant: [ 'wit', 'whisper' ]
architecture: [ 'x64' ]
include:
- os: windows-latest
architecture: 'x86'
python-version: "3.10"
poetry-version: "1.6.1"
variant: "wit"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}
- name: Install requirements
uses: abatilo/actions-poetry@v2
with:
poetry-version: ${{ matrix.poetry-version }}
- run: poetry install --with ${{ matrix.variant }} --with dev
- name: Caching
uses: actions/cache@v3
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}
- name: Download ffmpeg (Windows)
if: runner.os == 'Windows'
run: |
Invoke-WebRequest https://github.com/GyanD/codexffmpeg/releases/download/4.4/ffmpeg-4.4-essentials_build.zip -O ffmpeg.zip
tar.exe -xf ffmpeg.zip
move ffmpeg-4.4-essentials_build/bin/ffmpeg.exe ffmpeg.exe
move ffmpeg-4.4-essentials_build/bin/ffprobe.exe ffprobe.exe
- name: Package
run: |
poetry run pyside6-rcc src/resources.qrc -o src/resources_rc.py
poetry run pyinstaller ${{ github.event.inputs.spec }}
- name: Compress (Windows)
if: runner.os == 'Windows'
run: tar.exe -acf AlMufarrigh-${{ runner.os }}-${{ matrix.architecture }}-${{ matrix.variant }}-portable.zip dist
- name: Compress
if: runner.os != 'Windows'
run: zip -r9 AlMufarrigh-${{ runner.os }}-${{ matrix.architecture }}-${{ matrix.variant }}.zip dist/*
- uses: actions/upload-artifact@v3
with:
name: AlMufarrigh-${{ runner.os }}-${{ matrix.architecture }}-${{ matrix.variant }}
path: AlMufarrigh-${{ runner.os }}-${{ matrix.architecture }}-${{ matrix.variant }}.*
release:
runs-on: ubuntu-latest
needs: [ build ]
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
- name: Display structure of downloaded files
run: ls -R
- name: Release
uses: ncipollo/[email protected]
with:
allowUpdates: true
commit: 'master'
tag: ${{ github.event.inputs.version }}
name: ${{ github.event.inputs.version }}
artifacts: '*/*.zip'