ci: fix paths to artifacts #23
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 | |
| on: | |
| push: | |
| branches: [main] | |
| tags: ['v*'] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run linter | |
| run: npm run lint | |
| build: | |
| needs: lint | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - platform: macos-latest | |
| target: aarch64-apple-darwin | |
| bundles: dmg | |
| - platform: ubuntu-latest | |
| target: x86_64-unknown-linux-gnu | |
| bundles: "appimage deb" | |
| - platform: ubuntu-24.04-arm | |
| target: aarch64-unknown-linux-gnu | |
| bundles: "appimage deb" | |
| - platform: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| bundles: "msi nsis" | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: 'npm' | |
| - name: Install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install Tauri CLI (cargo plugin) | |
| run: cargo install tauri-cli --locked | |
| - name: Install dependencies (macOS) | |
| if: matrix.platform == 'macos-latest' | |
| run: | | |
| brew install create-dmg | |
| - name: Install dependencies (Linux) | |
| if: matrix.platform == 'ubuntu-latest' || matrix.platform == 'ubuntu-24.04-arm' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libgtk-3-dev libgirepository1.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev patchelf librsvg2-dev libfuse2 | |
| - name: Install frontend dependencies | |
| run: npm ci | |
| - name: Enable pnpm | |
| run: corepack enable | |
| - name: Download liblbug | |
| run: bash scripts/download-liblbug.sh | |
| - name: Build Tauri app (Linux) | |
| if: matrix.platform == 'ubuntu-latest' || matrix.platform == 'ubuntu-24.04-arm' | |
| run: pnpm tauri build --target ${{ matrix.target }} --bundles ${{ matrix.bundles }} --verbose | |
| env: | |
| # Needed for linuxdeploy AppImage bundling on CI runners | |
| APPIMAGE_EXTRACT_AND_RUN: "1" | |
| # Ensure linuxdeploy can resolve and bundle liblbug.so | |
| LD_LIBRARY_PATH: ${{ github.workspace }}/src-tauri/liblbug | |
| NO_STRIP: "true" # https://github.com/tauri-apps/tauri/issues/14796 | |
| - name: Build Tauri app (macOS/Windows) | |
| if: matrix.platform == 'macos-latest' || matrix.platform == 'windows-latest' | |
| run: pnpm tauri build --target ${{ matrix.target }} --bundles ${{ matrix.bundles }} --verbose | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: bundles-${{ matrix.platform }} | |
| path: | | |
| src-tauri/target/${{ matrix.target }}/release/bundle/**/*.dmg | |
| src-tauri/target/${{ matrix.target }}/release/bundle/**/*.msi | |
| src-tauri/target/${{ matrix.target }}/release/bundle/**/*.exe | |
| src-tauri/target/${{ matrix.target }}/release/bundle/**/*.AppImage | |
| src-tauri/target/${{ matrix.target }}/release/bundle/**/*.deb | |
| release: | |
| needs: build | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: artifacts/**/* | |
| draft: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |