From 9823fcccda42d803a773a0886275706274a49a6b Mon Sep 17 00:00:00 2001 From: mindfreq <144544047+mindfreq@users.noreply.github.com> Date: Mon, 4 May 2026 18:35:39 +0200 Subject: [PATCH] Create build.yml --- .github/workflows/build.yml | 79 +++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..c786603 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,79 @@ +name: Build Tag (Linux + Windows) + +on: + workflow_dispatch: + inputs: + tag: + description: "Git tag to build (example: v0.4.0)" + required: true + type: string + +permissions: + contents: write + +jobs: + build: + name: Build on ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-22.04, windows-2022] + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout selected tag + uses: actions/checkout@v4 + with: + ref: refs/tags/${{ inputs.tag }} + fetch-depth: 0 + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: pnpm + + - name: Setup Rust + uses: dtolnay/rust-toolchain@stable + + - name: Install Linux dependencies + if: runner.os == 'Linux' + run: sudo apt-get update && sudo apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev patchelf + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Build app + run: pnpm tauri build + + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + with: + name: bundles-${{ matrix.os }}-${{ inputs.tag }} + path: src-tauri/target/release/bundle/** + if-no-files-found: error + + release: + name: Upload assets to tag release + runs-on: ubuntu-22.04 + needs: build + + steps: + - name: Download all build artifacts + uses: actions/download-artifact@v4 + with: + pattern: bundles-* + path: release-assets + merge-multiple: true + + - name: Upload assets to GitHub Release + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ inputs.tag }} + files: release-assets/**/*