-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (70 loc) · 2.33 KB
/
package.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
name: Package Release
on:
release:
types:
- published
workflow_dispatch:
inputs:
release:
description: Upload to last release? (Used to test the workflow.)
type: boolean
default: false
required: true
jobs:
build-release:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Fetch Licenses
run: >
uv run --group license-fetching pip-licenses
--with-system
--from=all
--format=plain-vertical
--with-urls
--with-authors
--with-license-file
--output-file THIRD-PARTY-LICENSES.txt
- name: Fetch Python Interpreter License
shell: pwsh
run: |
$content = "-----------------------------------
Python License
"
$content >> .\THIRD-PARTY-LICENSES.txt
Get-Content (Join-Path (Split-Path (get-command python).Source) "LICENSE.txt") >> .\THIRD-PARTY-LICENSES.txt
- name: PyInstaller
run: >
uv run --group pyinstaller pyinstaller -D -y -n gamepadla
--recursive-copy-metadata gamepadla_plus
--collect-all gamepadla_plus
--add-data "LICENSE.txt;."
--add-data "THIRD-PARTY-LICENSES.txt;."
--hide-console hide-late
--noupx
--icon .\icon\gamepadla-plus.ico
.\gamepadla_plus\__main__.py
- name: Inno Setup Build
shell: pwsh
run: |
$ver = uv run .\helper\version.py
iscc /DMyAppVersion=$ver .\inno-setup.iss
- name: Copy Docs
run: cp .\LICENSE.txt .\dist\gamepadla\ && cp .\README.md .\dist\gamepadla\ && cp .\THIRD-PARTY-LICENSES.txt .\dist\gamepadla\
- name: 7z
run: 7z a gamepadla-plus-windows-x64-portable.7z .\dist\gamepadla\
- name: Upload To Release
if: ${{ github.event_name == 'release' || inputs.release == 'true' }}
uses: softprops/action-gh-release@v2
with:
files: |
gamepadla-plus-windows-x64-portable.7z
gamepadla-plus-windows-x64-installer.exe