prepare for theme development (#1) #8
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: 'build-only' | |
| on: | |
| workflow_dispatch: # 手动触发 | |
| pull_request: # 或者保留这个看你需要不需要在PR时构建 | |
| jobs: | |
| build-tauri: | |
| runs-on: ${{ matrix.platform }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - platform: 'macos-latest' | |
| args: '--target aarch64-apple-darwin' | |
| - platform: 'macos-latest' | |
| args: '--target x86_64-apple-darwin' | |
| - platform: 'ubuntu-22.04' | |
| args: '' | |
| - platform: 'windows-latest' | |
| args: '' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| fetch-depth: 0 | |
| - name: setup node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: lts/* | |
| - name: install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} | |
| - name: install dependencies (ubuntu only) | |
| if: matrix.platform == 'ubuntu-22.04' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf | |
| - name: install frontend dependencies | |
| run: | | |
| corepack enable pnpm | |
| pnpm install | |
| - name: generate icons | |
| run: pnpm tauri icon | |
| - name: build tauri app | |
| run: pnpm tauri build ${{ matrix.args }} | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: tauri-build-${{ matrix.platform }}-${{ matrix.args == '' && 'default' || matrix.args }} | |
| path: | | |
| ${{ matrix.platform == 'macos-latest' && 'src-tauri/target/**/release/bundle/**/*.dmg' || '' }} | |
| ${{ matrix.platform == 'windows-latest' && 'src-tauri/target/**/release/bundle/**/*.exe' || '' }} | |
| ${{ matrix.platform == 'windows-latest' && 'src-tauri/target/**/release/bundle/**/*.msi' || '' }} | |
| ${{ matrix.platform == 'ubuntu-22.04' && 'src-tauri/target/**/release/bundle/**/*.deb' || '' }} | |
| ${{ matrix.platform == 'ubuntu-22.04' && 'src-tauri/target/**/release/bundle/**/*.rpm' || '' }} | |
| if-no-files-found: error | |
| retention-days: 7 |