forked from constverum/ProxyBroker
-
-
Notifications
You must be signed in to change notification settings - Fork 115
47 lines (43 loc) · 1.56 KB
/
py-to-exe.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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
# https://github.com/pyinstaller/pyinstaller/issues/6296#issuecomment-962446033
name: Build Executable
on: [push, pull_request]
jobs:
build_exe:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.9"]
poetry-version: ["1.3.1"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install pyinstaller
run: pip install pyinstaller
- name: Install dependencies
run: pip install .
- name: Compile python to exe
run: |
mkdir -p build;
cd build;
if [ "$RUNNER_OS" == 'Windows' ]; then
PATH_SEPARATOR=";"
else
PATH_SEPARATOR=":"
fi
pyinstaller --onefile --name proxybroker-${RUNNER_OS}-$(arch) --add-data "../proxybroker/data${PATH_SEPARATOR}data" --workpath ./tmp --distpath . --clean ../py2exe_entrypoint.py;
rm -rf tmp *.spec;
- name: Archive proxybroker artifact
uses: actions/upload-artifact@v3
with:
name: proxybroker-build-artifacts
path: build/proxybroker-*-*