From feae539d858a6c8d6a407e36b294e2eefd7e7904 Mon Sep 17 00:00:00 2001 From: sonodima Date: Mon, 29 Jul 2024 23:33:18 +0200 Subject: [PATCH] add packaging in workflow action --- .github/workflows/release.yml | 22 +++++++++++++++++++++- Cargo.toml | 2 +- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ad85ede..a09b531 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,7 +7,7 @@ on: jobs: publish: - name: Build ${{ matrix.target }} + name: Build - ${{ matrix.target }} runs-on: ${{ matrix.os }} strategy: @@ -30,3 +30,23 @@ jobs: - name: Install Additional Tools run: cargo install cargo-bundle + + - name: Build + run: cargo bundle --release --target ${{ matrix.target }} + + - name: Package + run: | + cd target/${{ matrix.target }}/release/bundle + mkdir -p dist + if [ "${{ matrix.os }}" == "windows-latest" ]; then + mv msi/*.msi dist + elif [ "${{ matrix.os }}" == "macos-latest" ]; then + mv osx/*.app dist + elif [ "${{ matrix.os }}" == "ubuntu-latest" ]; then + mv -t deb/*.deb rpm/*.rpm dist + fi + + - name: Release + uses: softprops/action-gh-release@v2 + with: + files: target/${{ matrix.target }}/release/bundle/dist/* diff --git a/Cargo.toml b/Cargo.toml index 165d42b..f1dcd25 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,7 @@ webbrowser = "1.0" name = "BlurThing" identifier = "com.sonodima.BlurThing" icon = ["assets/icon/*.png"] -category = "Graphics" +category = "Graphics and Design" [profile.release] strip = true