-
-
Notifications
You must be signed in to change notification settings - Fork 228
73 lines (59 loc) · 2.53 KB
/
generate-windows-packages.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
name: Generate Windows Packages
on:
release:
types: [ published ]
permissions:
contents: write
jobs:
generate-windows-installer:
name: Generate Windows Packages
runs-on: windows-latest
steps:
- name: Git Checkout ${{github.event.release.tag_name}}
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Set version number for PyInstaller
run: |
python.exe tools\windows-installer\generate-version-info.py ${{github.event.release.tag_name}}
- name: Run PyInstaller to create binaries
run: |
pyinstaller.exe --noconfirm turing-system-monitor.spec
"${{github.event.release.tag_name}}" | Out-File ".\dist\turing-system-monitor\version.txt"
- name: Create InnoSetup installer from generated binaries
uses: Minionguyjpro/[email protected]
with:
path: tools/windows-installer/turing-system-monitor.iss
options: /O+
- name: Create portable zip archive from generated binaries
run: |
Remove-Item -r ".\dist\turing-system-monitor\res\themes\--Theme examples\"
7z a -tzip turing-system-monitor-${{github.event.release.tag_name}}-portable.zip ".\dist\turing-system-monitor"
- name: '📦 Archive Windows installer'
uses: actions/upload-artifact@v4
with:
name: turing-system-monitor-${{github.event.release.tag_name}}
path: tools\windows-installer\Output\turing-system-monitor-${{github.event.release.tag_name}}.exe
if-no-files-found: error
- name: '📦 Archive Windows portable archive'
uses: actions/upload-artifact@v4
with:
name: turing-system-monitor-${{github.event.release.tag_name}}-portable
path: turing-system-monitor-${{github.event.release.tag_name}}-portable.zip
if-no-files-found: error
- name: '📩 Publish Windows installer to Release'
run: |
gh release upload ${{github.event.release.tag_name}} tools\windows-installer\Output\turing-system-monitor-${{github.event.release.tag_name}}.exe
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: '📩 Publish Windows portable zip to Release'
run: |
gh release upload ${{github.event.release.tag_name}} turing-system-monitor-${{github.event.release.tag_name}}-portable.zip
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}