-
-
Notifications
You must be signed in to change notification settings - Fork 38
50 lines (48 loc) · 1.55 KB
/
win.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Build Windows Binaries
on:
push:
workflow_dispatch:
jobs:
Blint-Build:
runs-on: windows-latest
permissions:
contents: write
packages: write
id-token: write
steps:
- uses: actions/checkout@v4
with:
path: blint
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install poetry
id: poetry
run: |
python -m pip install --upgrade pip
python -m pip install setuptools pyinstaller tzdata poetry
cd blint
poetry config virtualenvs.create false
poetry install --no-cache --without dev
- name: Binary windows build
run: |
cd blint
pyinstaller blint/cli.py --noconfirm --log-level=WARN --nowindow --onefile --name blint --add-data="blint/data;blint/data" --add-data="blint/data/annotations;blint/data/annotations" --collect-submodules blint --disable-windowed-traceback -i blint.ico --version-file=file_version_info.txt --noupx
(Get-FileHash .\dist\blint.exe).hash | Out-File -FilePath .\dist\blint.exe.sha256
set PYTHONIOENCODING=UTF-8
.\dist\blint.exe -i .\dist\blint.exe -o reports --no-banner
env:
PYTHONIOENCODING: utf-8
LANG: en_US.utf-8
PYTHONUTF8: 1
- uses: actions/upload-artifact@v4
with:
path: blint/dist
name: blint-windows
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
blint/dist/blint.exe
blint/dist/blint.exe.sha256