Skip to content

update version string #9

update version string

update version string #9

name: usb_kvm_client_release
"on":
# Sequence of patterns matched against refs/tags
push:
tags:
# Push events to matching v*, i.e. v1.0, v20.15.10
- v*
# Allows you to run this workflow manually from the Actions tab 
workflow_dispatch:
jobs:
build-on-windows:
runs-on: windows-latest
permissions:
contents: write
steps:
# Check-out repository
- name: Check-out
uses: actions/checkout@v4
# Setup Python
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
architecture: "x64"
cache: "pip"
cache-dependency-path: '**/requirements*.txt'
# Install Dependencies
- name: Install Dependencies
run: pip install -r ./client/data/requirements.txt
# Code Static Check
- name: Code Static Check
run: |
black --check --verbose --config ./client/pyproject.toml ./client
flake8 --verbose --config=./client/flake8.cfg ./client
# Build python script into a stand-alone exe
- name: Build With Nuitka
uses: Nuitka/Nuitka-Action@main
with:
nuitka-version: main
working-directory: ./client
script-name: usb_kvm_client.py
python-flag: |
-u
-O
include-data-dir: |
.\data=data
.\icons=icons
.\translate=translate
enable-plugins: pyside6
include-qt-plugins: multimedia
# file information
product-name: usb kvm client
product-version: 1.0.0.0
file-description: a open source usb kvm client
# windows flag
windows-console-mode: disable
windows-icon-from-ico: .\icons\main.ico
onefile-windows-splash-screen-image: .\icons\splash.png
onefile: true
quiet: true
# Archive files
- run: |
Compress-Archive -Path ./client/build/*.exe -Destination ./client/build/usb_kvm_client_windows_latest.zip
Get-FileHash ./client/build/*.zip -Algorithm SHA256 | Format-List
# Push release
- name: Release Action
uses: ncipollo/release-action@v1
with:
artifacts: "./client/build/*.zip"
allowUpdates: true
token: ${{ secrets.PROJECT_TOKEN }}