fix py alias #9
This file contains hidden or 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: | |
branches: ["main"] | |
tags: | |
- 'v*' | |
jobs: | |
build-windows: | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: msys2 {0} | |
strategy: | |
matrix: | |
python-version: ["3.12"] | |
steps: | |
- name: Git Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up MSYS2 | |
uses: msys2/setup-msys2@v2 | |
with: | |
update: true | |
- name: Install GTK deps | |
run: | | |
pacman -S mingw-w64-ucrt-x86_64-gtk4 mingw-w64-ucrt-x86_64-python3-gobject --noconfirm | |
- name: Install Poetry and Deps | |
run: | | |
python --version | |
python -m pip install --upgrade pip | |
pip install poetry && poetry --version | |
poetry install --with dev | |
- name: Run Pyinstaller | |
run: | | |
poetry run pyinstaller --clean --onefile -w --add-data "data/style.css:./data" --exclude-module=pytest keyboard.py | |
mv ./dist/keyboard | |
- name: Store Dist | |
uses: actions/upload-artifact@v4 | |
with: | |
name: windows-dist | |
path: dist/ | |
github-release: | |
needs: [ build-windows ] | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
id-token: write | |
steps: | |
- name: Download Linux Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: windows-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 |