4040 uses : actions/setup-node@v4
4141 with :
4242 node-version : ' 20'
43+ cache : ' npm'
4344
4445 - name : Setup Python
4546 uses : actions/setup-python@v5
@@ -58,78 +59,20 @@ jobs:
5859 - name : Install Python dependencies
5960 run : pip install -r requirements.txt pyinstaller
6061
61- - name : Install main app Node dependencies
62+ - name : Install Node dependencies
6263 run : npm ci
6364
6465 - name : Build backend
6566 run : python build_backend.py
6667
67- - name : Build main Tauri app
68- run : npm run tauri build
69-
70- - name : Prepare installer payload
71- run : |
72- $version = "v${{ github.run_number }}"
73-
74- # 创建 payload 目录
75- New-Item -ItemType Directory -Force -Path "installer/src-tauri/payload"
76-
77- # 复制主程序
78- Copy-Item "src-tauri/target/release/lofter-spider.exe" "installer/src-tauri/payload/LoArchive.exe"
79-
80- # 复制后端
81- Copy-Item "src-tauri/binaries/loarchive-backend-x86_64-pc-windows-msvc.exe" "installer/src-tauri/payload/"
82-
83- # 复制 WebView2 加载器(如果存在)
84- if (Test-Path "src-tauri/target/release/WebView2Loader.dll") {
85- Copy-Item "src-tauri/target/release/WebView2Loader.dll" "installer/src-tauri/payload/"
86- }
87-
88- Write-Host "Payload prepared successfully"
89- Get-ChildItem "installer/src-tauri/payload" -Recurse
90- shell : pwsh
91-
92- - name : Install installer Node dependencies
93- run : |
94- cd installer
95- npm install
96- shell : pwsh
97-
98- - name : Build custom installer
99- run : |
100- cd installer
101- npm run tauri build
102- shell : pwsh
103-
104- - name : Create portable ZIP
105- run : |
106- $version = "v${{ github.run_number }}"
107- $zipName = "LoArchive-${version}-portable.zip"
108-
109- New-Item -ItemType Directory -Force -Path "portable/LoArchive"
110- Copy-Item "src-tauri/target/release/lofter-spider.exe" "portable/LoArchive/LoArchive.exe"
111- Copy-Item "src-tauri/binaries/loarchive-backend-x86_64-pc-windows-msvc.exe" "portable/LoArchive/"
112-
113- Compress-Archive -Path "portable/LoArchive" -DestinationPath $zipName -Force
114-
115- echo "PORTABLE_ZIP=$zipName" >> $env:GITHUB_ENV
116- shell : pwsh
117-
118- - name : Rename installer
119- run : |
120- $version = "v${{ github.run_number }}"
121- $installerPath = Get-ChildItem "installer/src-tauri/target/release/bundle/nsis/*.exe" | Select-Object -First 1
122- $newName = "LoArchive-${version}-setup.exe"
123- Copy-Item $installerPath.FullName $newName
124- echo "INSTALLER_NAME=$newName" >> $env:GITHUB_ENV
125- shell : pwsh
126-
127- - name : Create Release
128- uses : softprops/action-gh-release@v2
68+ - name : Build Tauri app
69+ uses : tauri-apps/tauri-action@v0
70+ env :
71+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
12972 with :
130- tag_name : v${{ github.run_number }}
131- name : LoArchive v${{ github.run_number }}
132- body : |
73+ tagName : v${{ github.run_number }}
74+ releaseName : ' LoArchive v${{ github.run_number }}'
75+ releaseBody : |
13376 ## 🚀 LoArchive v${{ github.run_number }}
13477
13578 ### 📝 更新内容
@@ -140,12 +83,11 @@ jobs:
14083 ### 📥 下载说明
14184 | 文件 | 说明 |
14285 |------|------|
143- | `LoArchive-v*-setup.exe` | 🎯 **安装版**(推荐,自定义安装程序) |
144- | `LoArchive-v*-portable.zip` | 📦 **便携版**(解压即用,无需安装) |
86+ | `LoArchive_*_x64-setup.exe` | 🎯 **安装版**(推荐) |
14587
14688 ### 🔧 使用方法
147- 1. 下载安装版或便携版
148- 2. 安装/解压后打开应用
89+ 1. 下载并安装
90+ 2. 打开应用
14991 3. 在「设置」中配置 Lofter 登录信息
15092 4. 开始使用!
15193
@@ -159,10 +101,5 @@ jobs:
159101
160102 ---
161103 <sub>构建时间: ${{ github.event.head_commit.timestamp }}</sub>
162- files : |
163- LoArchive-v${{ github.run_number }}-setup.exe
164- LoArchive-v${{ github.run_number }}-portable.zip
165- draft : false
104+ releaseDraft : false
166105 prerelease : false
167- env :
168- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments