移除tailwind的预检样式,解决框架样式问题 #21
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 Tauri App' | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| permissions: | |
| contents: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # - platform: 'macos-latest' # for Arm based macs (M1 and above). | |
| # args: '--target aarch64-apple-darwin' | |
| # - platform: 'macos-latest' # for Intel based macs. | |
| # args: '--target x86_64-apple-darwin' | |
| # - platform: 'ubuntu-latest' # for Tauri v1 you could replace this with ubuntu-20.04. | |
| # args: '' | |
| - platform: 'windows-latest' | |
| args: '' | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| 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-latest' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Install frontend dependencies | |
| run: pnpm install | |
| - name: Execute get-aria2 script | |
| run: pnpm get-aria2 | |
| - name: Create .env.local file | |
| run: | | |
| if [ -f .env ]; then | |
| cp .env .env.local | |
| else | |
| touch .env.local | |
| fi | |
| echo "APP_ID=${{ secrets.APP_ID }}" >> .env.local | |
| echo "APP_KEY=${{ secrets.APP_KEY }}" >> .env.local | |
| shell: bash | |
| - name: Build Tauri App | |
| uses: tauri-apps/tauri-action@v0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: build-artifacts-${{ matrix.platform }} | |
| path: | | |
| src-tauri/target/release/bundle/deb/*.deb | |
| src-tauri/target/release/bundle/appimage/*.AppImage | |
| src-tauri/target/release/bundle/dmg/*.dmg | |
| src-tauri/target/release/bundle/msi/*.msi | |
| src-tauri/target/release/bundle/nsis/*.exe | |
| src-tauri/target/release/*.exe | |
| if-no-files-found: ignore |