fix: CI - enable bundle, package macOS as .app zip #4
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 & Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| - os: macos-latest | |
| target: aarch64-apple-darwin | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Install frontend dependencies | |
| run: npm install | |
| - name: Generate macOS icon from ICO | |
| if: matrix.os == 'macos-latest' | |
| run: | | |
| brew install imagemagick | |
| magick src-tauri/icons/icon.ico -resize 512x512 -background none -alpha on -type TrueColorAlpha PNG32:src-tauri/icons/icon.png | |
| - name: Build Tauri app | |
| run: npx tauri build --target ${{ matrix.target }} | |
| - name: Prepare Windows artifact | |
| if: matrix.os == 'windows-latest' | |
| shell: bash | |
| run: cp "src-tauri/target/${{ matrix.target }}/release/yauz.exe" "yauz-windows-x64.exe" | |
| - name: Prepare macOS artifact | |
| if: matrix.os == 'macos-latest' | |
| run: | | |
| cd "src-tauri/target/${{ matrix.target }}/release/bundle/macos" | |
| zip -r "$GITHUB_WORKSPACE/YAUZ-macos-arm64.zip" YAUZ.app | |
| - name: Upload to Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| yauz-windows-x64.exe | |
| YAUZ-macos-arm64.zip |