Skip to content

Commit 0e39ad7

Browse files
committed
test
1 parent 7ba85ba commit 0e39ad7

File tree

2 files changed

+223
-143
lines changed

2 files changed

+223
-143
lines changed

.github/workflows/windows.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ jobs:
3939
- name: Download External Data Release
4040
id: download_data
4141
run: |
42+
mkdir data
43+
cd data
44+
touch __init__.py
4245
# 获取 LiteLoaderQQNT 的最新版本
4346
$LLtag = (Invoke-RestMethod -Uri "https://api.github.com/repos/LiteLoaderQQNT/LiteLoaderQQNT/releases/latest").tag_name
4447
echo "LLtag=$LLtag" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
@@ -51,14 +54,17 @@ jobs:
5154
curl -L -o "list-viewer-${LVtag}.zip" "https://github.com/ltxhhz/LL-plugin-list-viewer/releases/download/${LVtag}/list-viewer.zip"
5255
5356
dir
57+
cd ..
5458
5559
- name: Restore Cache
5660
uses: actions/cache/restore@v4
57-
if: matrix.builder == 'nuitka'
5861
with:
59-
path: nuitka_cache
60-
key: nuitka-cache
61-
restore-keys: nuitka-
62+
path: |
63+
${{ matrix.builder }}_cache
64+
dist
65+
key: ${{ matrix.builder }}-cache-${{ github.run_number }}
66+
restore-keys: ${{ matrix.builder }}-cache-
67+
6268

6369
- name: Build by ${{ matrix.builder }}
6470
env:
@@ -69,17 +75,18 @@ jobs:
6975
7076
if ('${{ matrix.builder }}' -eq 'nuitka') {
7177
$env:NUITKA_CACHE_DIR = "nuitka_cache"
72-
nuitka --onefile --windows-uac-admin --include-data-files="LiteLoaderQQNT-$($env:LLtag).zip"="./" --include-data-files="list-viewer-$($env:LVtag).zip"="./" install_windows.py --output-dir="dist" --output-file="install_windows_nuitka" --assume-yes-for-downloads --enable-plugins="tk-inter" --enable-console --mingw64
78+
nuitka --onefile --windows-uac-admin --include-data-dir="data/"="data/" install_windows.py --output-dir="dist" --output-file="install_windows_nuitka" --assume-yes-for-downloads --enable-plugins="tk-inter" --enable-console --mingw64
7379
} else {
74-
pyinstaller --onefile --uac-admin --add-data "LiteLoaderQQNT-$($env:LLtag).zip:." --add-data "list-viewer-$($env:LVtag).zip:." install_windows.py --distpath dist --name install_windows_pyinstaller
80+
pyinstaller --onefile --uac-admin --add-data "data/:data/" install_windows.py --distpath dist --name install_windows_pyinstaller
7581
}
7682
7783
- name: Save Cache
7884
uses: actions/cache/save@v4
79-
if: matrix.builder == 'nuitka'
8085
with:
81-
path: nuitka_cache
82-
key: nuitka-cache
86+
path: |
87+
${{ matrix.builder }}_cache
88+
dist
89+
key: ${{ matrix.builder }}-cache-${{ github.run_number }}
8390

8491
- name: Upload install_windows_${{ matrix.builder }}.exe
8592
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)