-
Notifications
You must be signed in to change notification settings - Fork 3
60 lines (49 loc) · 1.47 KB
/
build.yml
File metadata and controls
60 lines (49 loc) · 1.47 KB
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
51
52
53
54
55
56
57
58
59
60
name: Pyinstaller builds
on:
workflow_dispatch:
push:
tags:
- 'v*'
jobs:
build-windows:
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install binarylane-cli
run: pip install .
- name: Install PyInstaller
run: pip install pyinstaller
- name: Run PyInstaller
run: pyinstaller --name bl --onefile --copy-metadata binarylane-cli --collect-submodules binarylane src/binarylane/console/__main__.py
- uses: actions/upload-artifact@v4
with:
name: windows
path: dist/*
build-linux:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
cache-dependency-glob: |
**/poetry.lock
**/pyproject.toml
**/uv.lock
- name: Create static binary
run: >
uv run --no-project --python 3.10 --with .,pyinstaller,staticx --
bash -c 'pyinstaller --name bl --onefile --copy-metadata binarylane-cli
--collect-submodules binarylane src/binarylane/console/__main__.py &&
staticx --strip --no-compress dist/bl dist/bl'
- uses: actions/upload-artifact@v4
with:
name: linux-x64
path: dist/*