fix(ci): use cargo tauri directly and fix asset name pattern #2
Workflow file for this run
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: Dashboard Release | |
| on: | |
| push: | |
| tags: | |
| - "dashboard-v*" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| build: | |
| name: Build Dashboard (${{ matrix.settings.label }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| settings: | |
| - host: macos-latest | |
| target: aarch64-apple-darwin | |
| label: macOS ARM64 | |
| - host: macos-latest | |
| target: x86_64-apple-darwin | |
| label: macOS Intel | |
| - host: ubuntu-22.04 | |
| target: x86_64-unknown-linux-gnu | |
| label: Linux x64 | |
| - host: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| label: Windows x64 | |
| runs-on: ${{ matrix.settings.host }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.settings.target }} | |
| - name: Install Linux dependencies | |
| if: contains(matrix.settings.host, 'ubuntu') | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Install Tauri CLI | |
| run: cargo install tauri-cli --version "^2" | |
| - name: Build and upload artifacts | |
| uses: tauri-apps/tauri-action@v0 | |
| timeout-minutes: 30 | |
| with: | |
| projectPath: packages/dashboard | |
| tauriScript: cargo tauri | |
| args: --target ${{ matrix.settings.target }} | |
| updaterJsonPreferNsis: true | |
| tagName: ${{ github.ref_name }} | |
| releaseDraft: true | |
| assetNamePattern: magic-context-dashboard-[platform]-[arch][ext] | |
| 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 }} |