-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add release.yaml * add release.yaml * remove --one-file * try -no-pie * try again with latest ubuntu 24.04 * try again with latest ubuntu 24.04 * test * use awk * done
- Loading branch information
1 parent
a5c0c56
commit 3840fe6
Showing
4 changed files
with
121 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
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 install libgirepository1.0-dev gcc libgtk-4-dev -y | ||
- name: Install Poetry and Deps | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install poetry && poetry --version | ||
poetry install --with dev | ||
- name: Run Pyinstaller | ||
run: | | ||
poetry 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 |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# -*- mode: python ; coding: utf-8 -*- | ||
|
||
|
||
a = Analysis( | ||
['keyboard.py'], | ||
pathex=[], | ||
binaries=[], | ||
datas=[('data/style.css', './data')], | ||
hiddenimports=[], | ||
hookspath=[], | ||
hooksconfig={ | ||
'gi': { | ||
'module-versions': { | ||
'Gtk': '4.0' | ||
} | ||
} | ||
}, | ||
runtime_hooks=[], | ||
excludes=['pytest'], | ||
noarchive=False, | ||
optimize=0, | ||
) | ||
pyz = PYZ(a.pure) | ||
|
||
exe = EXE( | ||
pyz, | ||
a.scripts, | ||
a.binaries, | ||
a.datas, | ||
[], | ||
name='keyboard', | ||
debug=False, | ||
bootloader_ignore_signals=False, | ||
strip=False, | ||
upx=True, | ||
upx_exclude=[], | ||
runtime_tmpdir=None, | ||
console=False, | ||
disable_windowed_traceback=False, | ||
argv_emulation=False, | ||
target_arch=None, | ||
codesign_identity=None, | ||
entitlements_file=None, | ||
) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[Desktop Entry] | ||
Type=Application | ||
Name=Virtual Keyboard | ||
GenericName=On-screen Keyboard | ||
Comment=All-in-one virtual keyboard | ||
Exec=/usr/local/bin/virtual-keyboard |