wip(feat): add auto update endpoint #24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| push: | |
| paths: | |
| - "src-tauri/tauri.conf.json" | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| release: | |
| runs-on: windows-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Extract version from tauri.conf.json | |
| id: version | |
| shell: pwsh | |
| run: | | |
| $config = Get-Content src-tauri/tauri.conf.json | ConvertFrom-Json | |
| $version = $config.version | |
| echo "version=$version" >> $env:GITHUB_OUTPUT | |
| echo "Version: $version" | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v3 | |
| with: | |
| version: latest | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "latest" | |
| cache: "pnpm" | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| # 编译缓存 | |
| - name: Rust Cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: "src-tauri -> target" | |
| - name: Install dependencies | |
| run: pnpm install | |
| - uses: tauri-apps/tauri-action@v0 | |
| continue-on-error: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} | |
| TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} | |
| with: | |
| tagName: v__VERSION__ | |
| releaseName: Majdata Hub v__VERSION__ | |
| releaseDraft: false | |
| prerelease: false | |
| args: "" |