-
Notifications
You must be signed in to change notification settings - Fork 4
54 lines (46 loc) · 1.46 KB
/
build.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
name: troppical-build
on:
push:
branches: [ "*" ]
pull_request:
types: [ opened, synchronize, reopened ]
branches: [ master ]
workflow_dispatch:
jobs:
Windows-build:
runs-on: windows-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Cache pip
uses: actions/cache@v3
with:
path: |
~\AppData\Local\pip\Cache
~\AppData\Local\pyinstaller\Cache
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
- name: Install dependencies
run: pip install pyqt6 pyinstaller pywin32 requests
- name: Build
shell: bash
run: |
pyinstaller --clean --onefile --icon=icon.ico --add-data "icon.ico;." --windowed main.py
pyinstaller --clean --onefile --icon=icon.ico --windowed init_troppical.py
env:
GITHUB_TOKEN: ${{ secrets.BUILD }}
- name: Upload troppical
uses: actions/upload-artifact@v4
with:
name: troppical-windows
path: ${{ github.workspace }}/dist/main.exe
- name: Upload init_troppical
uses: actions/upload-artifact@v4
with:
name: init-troppical-windows
path: ${{ github.workspace }}/dist/init_troppical.exe