-
Notifications
You must be signed in to change notification settings - Fork 4
88 lines (74 loc) · 2.17 KB
/
pyinstaller.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Python Package
on:
pull_request:
push:
branches:
- main
- stable
tags:
- 'v*.*.*'
jobs:
pytest:
strategy:
fail-fast: false
matrix:
include:
# - os: 'ubuntu-latest'
# python: '3.10'
# name: 'Linux'
#
# - os: 'macos-latest'
# python: '3.10'
# name: 'macOS'
- os: 'windows-latest'
python: '3.10'
name: 'Windows'
runs-on: ${{ matrix.os }}
name: ${{ matrix.name }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: Set up cache
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install Python packages
run: |
python -m pip install --upgrade -r requirements-setuptools.txt
python -m pip install -r requirements.txt
python -m pip install -r requirements-pyinstaller.txt
- name: create executable
run: |
python -m PyInstaller dread_editor.spec
cd dist
7z a -mx=7 -myx=7 dread_editor_${{ matrix.name }}.7z dread_editor
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: Dread Editor ${{ matrix.name }}
if-no-files-found: error
path: |
dist/dread_editor_${{ matrix.name }}.7z
- name: Upload binaries to release
uses: svenstaro/[email protected]
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/dread_editor_${{ matrix.name }}.7z
file_glob: true
tag: ${{ github.ref }}
overwrite: true
body: "Release executable"