Skip to content

Commit 73d3fa7

Browse files
authored
add icon&workflow, and small fix (#2)
1 parent 91127a8 commit 73d3fa7

14 files changed

Lines changed: 704 additions & 4814 deletions

File tree

.github/workflows/release.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build-and-release:
13+
runs-on: windows-latest
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Setup pnpm
22+
uses: pnpm/action-setup@v4
23+
with:
24+
version: 10
25+
26+
- name: Setup Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: 20
30+
cache: pnpm
31+
32+
- name: Setup Rust
33+
uses: dtolnay/rust-toolchain@stable
34+
35+
- name: Install dependencies
36+
run: pnpm install --frozen-lockfile
37+
38+
- name: Build app and NSIS installer
39+
run: pnpm package:win
40+
41+
- name: Collect release artifacts
42+
shell: pwsh
43+
run: |
44+
New-Item -ItemType Directory -Path release-assets -Force | Out-Null
45+
46+
$mainExe = Get-ChildItem -Path "src-tauri/target/release" -Filter "*.exe" -File |
47+
Where-Object { $_.DirectoryName -notmatch "\\build\\|\\deps\\|\\examples\\" } |
48+
Select-Object -First 1
49+
if (-not $mainExe) {
50+
throw "Main executable not found in src-tauri/target/release"
51+
}
52+
Copy-Item $mainExe.FullName -Destination "release-assets/"
53+
54+
$installer = Get-ChildItem -Path "src-tauri/target/release/bundle/nsis" -Filter "*-setup.exe" -File |
55+
Sort-Object LastWriteTime -Descending |
56+
Select-Object -First 1
57+
if (-not $installer) {
58+
throw "NSIS installer not found in src-tauri/target/release/bundle/nsis"
59+
}
60+
Copy-Item $installer.FullName -Destination "release-assets/"
61+
62+
- name: Create GitHub release and upload assets
63+
uses: softprops/action-gh-release@v2
64+
with:
65+
generate_release_notes: true
66+
files: |
67+
release-assets/*.exe

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
node_modules
22
dist
33
src-tauri/target
4+
src-tauri/gen/schemas/
45
*.zip
56

package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
2-
"name": "gtlite-downloader-gui",
3-
"private": true,
4-
"version": "0.1.0",
2+
"name": "gregtech-lite-modpack-downloader",
3+
"version": "1.0.0",
54
"type": "module",
65
"scripts": {
76
"dev": "vite",
@@ -12,10 +11,10 @@
1211
"package:win:debug": "tauri build --debug --bundles nsis"
1312
},
1413
"dependencies": {
15-
"@tauri-apps/api": "^2.0.0"
14+
"@tauri-apps/api": "^2.10.1"
1615
},
1716
"devDependencies": {
18-
"@tauri-apps/cli": "^2.1.0",
19-
"vite": "^5.4.0"
17+
"@tauri-apps/cli": "^2.10.1",
18+
"vite": "^7.3.1"
2019
}
2120
}

0 commit comments

Comments
 (0)