@@ -3,29 +3,22 @@ name: Release Build
33on :
44 push :
55 tags :
6- - " v*" # 当推送以 'v' 开头的标签时触发
6+ - " v*"
77
88jobs :
99 build :
1010 strategy :
1111 matrix :
1212 include :
13- # macOS ARM64 (Apple Silicon)
1413 - os : macos-latest
1514 target : aarch64-apple-darwin
1615 platform : macos-arm64
17- # macOS x64 (Intel)
1816 - os : macos-latest
1917 target : x86_64-apple-darwin
2018 platform : macos-x64
21- # Windows x64
2219 - os : windows-latest
2320 target : x86_64-pc-windows-msvc
2421 platform : windows-x64
25- # Windows ARM64
26- # - os: windows-latest
27- # target: aarch64-pc-windows-msvc
28- # platform: windows-arm64
2922
3023 runs-on : ${{ matrix.os }}
3124
@@ -39,20 +32,13 @@ jobs:
3932 node-version : " 20"
4033 cache : " yarn"
4134
42- - name : Setup Rust
35+ - name : Setup Rust toolchain
4336 uses : dtolnay/rust-toolchain@stable
4437 with :
4538 targets : ${{ matrix.target }}
4639
47- - name : Install Rust dependencies (Windows)
48- if : matrix.os == 'windows-latest'
49- run : |
50- npm install -g @tauri-apps/cli
51-
52- - name : Install Rust dependencies (macOS)
53- if : matrix.os == 'macos-latest'
54- run : |
55- npm install -g @tauri-apps/cli
40+ - name : Install Tauri CLI
41+ run : npm install -g @tauri-apps/cli
5642
5743 - name : Install frontend dependencies
5844 run : yarn install --frozen-lockfile
@@ -61,23 +47,15 @@ jobs:
6147 run : yarn build
6248
6349 - name : Build Tauri app
64- run : cargo tauri build --target ${{ matrix.target }}
50+ run : tauri build --target ${{ matrix.target }}
6551
66- - name : Upload macOS artifacts
67- if : matrix.os == 'macos-latest'
68- uses : actions/upload-artifact@v4
69- with :
70- name : easydb-${{ matrix.platform }}
71- path : src-tauri/target/${{ matrix.target }}/release/bundle/dmg/*.dmg
72- retention-days : 30
73-
74- - name : Upload Windows artifacts
75- if : matrix.os == 'windows-latest'
52+ - name : Upload artifacts
7653 uses : actions/upload-artifact@v4
7754 with :
7855 name : easydb-${{ matrix.platform }}
7956 path : |
80- src-tauri/target/${{ matrix.target }}/release/bundle/nsis/*.exe
57+ src-tauri/target/${{ matrix.target }}/release/bundle/**/*.dmg
58+ src-tauri/target/${{ matrix.target }}/release/bundle/**/*.exe
8159 retention-days : 30
8260
8361 create-release :
@@ -96,20 +74,13 @@ jobs:
9674 with :
9775 path : ./artifacts
9876
99- - name : List downloaded artifacts
100- run : |
101- find ./artifacts -type f -name "*.dmg" -o -name "*.msi" -o -name "*.exe" -o -name "*.app" | head -20
102-
10377 - name : Create Release
10478 uses : softprops/action-gh-release@v1
10579 with :
10680 tag_name : ${{ github.ref_name }}
10781 name : Release ${{ github.ref_name }}
108- draft : false
109- prerelease : false
11082 files : |
111- ./artifacts/easydb-macos-arm64/*.dmg
112- ./artifacts/easydb-macos-x64/*.dmg
113- ./artifacts/easydb-windows-x64/*.exe
83+ ./artifacts/**/*/*.dmg
84+ ./artifacts/**/*/*.exe
11485 env :
11586 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments