handle interrupt (#27) #46
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build-linux: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Setup Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.12" | |
- name: Git Checkout | |
uses: actions/checkout@v4 | |
- name: Install GTK deps | |
run: | | |
sudo apt update | |
sudo apt install libgirepository-2.0-dev libcairo2-dev gir1.2-gtk-4.0 -y | |
- name: Install uv | |
uses: astral-sh/setup-uv@v4 | |
with: | |
enable-cache: true | |
cache-dependency-glob: "uv.lock" | |
python-version: ${{ matrix.python-version }} | |
- name: Install the dependencies | |
run: uv sync --all-extras --dev | |
- name: Run Pyinstaller | |
run: | | |
uv run pyinstaller keyboard.spec | |
version=$(ldd --version | head -n 1 | awk '{print $NF}') | |
pyversion=$(python --version 2>&1 | awk '{print $2}') | |
mv ./dist/keyboard ./dist/virtual-keyboard-py$pyversion-glib$version-x86_64 | |
- name: Store Dist | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux-dist | |
path: dist/ | |
github-release: | |
needs: [ build-linux ] | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
id-token: write | |
steps: | |
- name: Download Linux Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: linux-dist | |
path: dist/ | |
- name: Create GitHub Release | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
run: >- | |
gh release create "${{ github.ref_name }}" dist/** | |
--repo "${{ github.repository }}" | |
--generate-notes |