-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (43 loc) · 1.44 KB
/
main.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
name: PyInstaller Build
on: [ push ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-20.04, macos-11, windows-2022 ]
python-version: [ "3.7" ]
steps:
- uses: actions/checkout@v3
- uses: benjlevesque/[email protected]
name: Get build commit short SHA
id: short-sha
with:
length: 7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyinstaller
pip install -r requirements.txt
- name: PyInstaller Build
run: |
pyinstaller -F main.py -n mullvad-ping-py -i assets/favicon.ico
- name: Rename Binaries
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
mv dist/mullvad-ping-py dist/mullvad-ping-py-linux-${{ env.SHA }}
elif [ "$RUNNER_OS" == "Windows" ]; then
mv dist/mullvad-ping-py.exe dist/mullvad-ping-py-windows-${{ env.SHA }}.exe
elif [ "$RUNNER_OS" == "macOS" ]; then
mv dist/mullvad-ping-py dist/mullvad-ping-py-macos-${{ env.SHA }}
fi
shell: bash
- uses: actions/upload-artifact@v3
name: Upload Artifact
with:
name: mullvad-ping-py-${{ env.SHA }}
path: dist/