From 907d31177efdd571439d25942a9483efa0c52ccf Mon Sep 17 00:00:00 2001 From: zihluwang Date: Mon, 28 Jul 2025 12:49:39 +0800 Subject: [PATCH] ci: change ci config --- .github/workflows/package.yml | 50 +++++++++++++++++++++++------------ package.json | 2 +- src-tauri/Cargo.lock | 2 +- src-tauri/Cargo.toml | 2 +- src-tauri/tauri.conf.json | 2 +- 5 files changed, 37 insertions(+), 21 deletions(-) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 7ef6b2a..2f7cbcf 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -39,26 +39,42 @@ jobs: node-version: 20 cache: 'pnpm' + - name: Install Rust Stable + uses: dtolnay/rust-toolchain@stable + with: + targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} + + - name: Rust Cache + uses: swatinem/rust-cache@v2 + with: + workspaces: './src-tauri -> target' + - name: Install Dependencies run: pnpm install - name: Build - run: pnpm tauri build - - - name: Upload Artefact for Windows - if: matrix.platform == 'windows-latest' - uses: actions/upload-artifact@v4 + uses: tauri-apps/tauri-action@v0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - name: Installers - path: | - D:\a\zuanbot\zuanbot\src-tauri\target\release\bundle\msi\zuanbot_${{ github.event.release.tag_name }}_x64_en-US.msi - D:\a\zuanbot\zuanbot\src-tauri\target\release\bundle\nsis\zuanbot_${{ github.event.release.tag_name }}_x64-setup.exe + tagName: __VERSION__ + releaseName: 'v__VERSION__' + args: ${{ matrix.args }} - - name: Upload Artefact - if: matrix.platform == 'macos-latest' - uses: actions/upload-artifact@v4 - with: - name: Installers - path: | - /Users/runner/work/zuanbot/zuanbot/src-tauri/target/release/bundle/dmg/zuanbot_${{ github.event.release.tag_name }}_aarch64.dmg - /Users/runner/work/zuanbot/zuanbot/src-tauri/target/release/bundle/dmg/zuanbot_${{ github.event.release.tag_name }}_x64.dmg \ No newline at end of file +# - name: Upload Artefact for Windows +# if: matrix.platform == 'windows-latest' +# uses: actions/upload-artifact@v4 +# with: +# name: Installers +# path: | +# D:\a\zuanbot\zuanbot\src-tauri\target\release\bundle\msi\zuanbot_${{ github.event.release.tag_name }}_x64_en-US.msi +# D:\a\zuanbot\zuanbot\src-tauri\target\release\bundle\nsis\zuanbot_${{ github.event.release.tag_name }}_x64-setup.exe +# +# - name: Upload Artefact +# if: matrix.platform == 'macos-latest' +# uses: actions/upload-artifact@v4 +# with: +# name: Installers +# path: | +# /Users/runner/work/zuanbot/zuanbot/src-tauri/target/release/bundle/dmg/zuanbot_${{ github.event.release.tag_name }}_aarch64.dmg +# /Users/runner/work/zuanbot/zuanbot/src-tauri/target/release/bundle/dmg/zuanbot_${{ github.event.release.tag_name }}_x64.dmg \ No newline at end of file diff --git a/package.json b/package.json index 36c9a91..4cd153e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "zuanbot", "private": true, - "version": "0.1.0", + "version": "0.2.0-dev01", "type": "module", "scripts": { "dev": "vite", diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index d4c889d..df74f50 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -5233,7 +5233,7 @@ dependencies = [ [[package]] name = "zuanbot" -version = "0.1.0-alpha" +version = "0.1.0-dev01" dependencies = [ "anyhow", "rusqlite", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 61e96e9..d29c590 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "zuanbot" -version = "0.1.0-alpha" +version = "0.1.0-dev01" description = "A Tauri App" authors = ["zihluwang"] edition = "2021" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 6c6b13a..b6ee899 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.tauri.app/config/2", "productName": "zuanbot", - "version": "0.1.0", + "version": "0.2.0-dev01", "identifier": "io.github.zihluwang.zuanbot", "build": { "beforeDevCommand": "pnpm dev",