diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c786603..ca563ae 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,5 +1,4 @@ name: Build Tag (Linux + Windows) - on: workflow_dispatch: inputs: @@ -7,10 +6,8 @@ on: description: "Git tag to build (example: v0.4.0)" required: true type: string - permissions: contents: write - jobs: build: name: Build on ${{ matrix.os }} @@ -18,52 +15,54 @@ jobs: 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 + - name: Upload build artifacts (Linux) + if: runner.os == 'Linux' uses: actions/upload-artifact@v4 with: name: bundles-${{ matrix.os }}-${{ inputs.tag }} - path: src-tauri/target/release/bundle/** + path: | + src-tauri/target/release/bundle/deb/*.deb + src-tauri/target/release/bundle/rpm/*.rpm + src-tauri/target/release/bundle/appimage/*.AppImage + if-no-files-found: error + - name: Upload build artifacts (Windows) + if: runner.os == 'Windows' + uses: actions/upload-artifact@v4 + with: + name: bundles-${{ matrix.os }}-${{ inputs.tag }} + path: | + src-tauri/target/release/bundle/msi/*.msi + src-tauri/target/release/bundle/nsis/*.exe 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 @@ -71,9 +70,8 @@ jobs: 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/**/* + files: release-assets/**/* \ No newline at end of file