Skip to content

Bump version to 2.1 #83

Bump version to 2.1

Bump version to 2.1 #83

Workflow file for this run

name: Linux Nuitka Pipeline
on:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop
jobs:
build:
runs-on: ubuntu-22.04 # Ensure the job runs only on Ubuntu 22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all tags
- name: Get latest Git tag
id: get_version
run: |
VERSION=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.1.0")
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "Resolved version: $VERSION"
- name: Install missing system libraries (XCB, TBB, etc.)
run: |
sudo apt-get update
sudo apt-get install -y \
libxcb1 \
libxcb-keysyms1 \
libxcb-shape0 \
libxcb-xkb1 \
libxcb-render-util0 \
libxcb-image0 \
libxcb-xinerama0 \
libxkbcommon-x11-0 \
libxcb-icccm4 \
libtbb12 \
ccache \
libsox-dev
- name: Install FFmpeg
run: sudo apt update && sudo apt install -y ffmpeg
- name: Verify FFmpeg installation
run: |
which ffmpeg
ffmpeg -version
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: Set up Python virtual environment
run: |
python -m venv .venv
- name: Install dependencies
run: |
source .venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
pip install nuitka
- name: Verify Whisper assets directory
run: |
source .venv/bin/activate
whisperPath=$(python -c "import whisper; print(whisper.__file__)")
assetsPath=$(dirname $whisperPath)/assets
if [ -d "$assetsPath" ]; then
echo "The 'assets' directory exists at: $assetsPath"
else
echo "The 'assets' directory DOES NOT exist."
exit 1
fi
- name: Compile with Nuitka
run: |
source .venv/bin/activate
ffmpegPath=$(which ffmpeg)
nuitka \
--assume-yes-for-downloads \
--enable-plugin=pyqt5 \
--include-data-files="pytranscriber.sqlite=pytranscriber.sqlite" \
--include-data-files="$ffmpegPath=ffmpeg" \
--include-data-files="pytranscriber/gui/*.qm=pytranscriber/gui/" \
--include-package-data="whisper:assets/*=whisper/assets" \
main.py \
--onefile \
--output-dir=dist
- name: Zip the binary with version number
run: |
cd dist
mv main.bin "pyTranscriber-${VERSION}"
- name: Upload built executable
uses: actions/upload-artifact@v4
with:
name: pyTranscriber-linux-nuitka-${{ env.VERSION }}
path: ./dist/pyTranscriber-${{ env.VERSION }} # Adjust this path if Nuitka outputs elsewhere
download:
runs-on: ubuntu-22.04
needs: build
steps:
- name: Download built executable
uses: actions/download-artifact@v4
with:
path: ./output
- name: List downloaded files
run: dir ./output