From b89bfb10d8b47f7f4cd5538b13fd090c64fc6d97 Mon Sep 17 00:00:00 2001 From: ArcticLampyrid Date: Wed, 21 Feb 2024 19:35:04 +0800 Subject: [PATCH] ci: depoly debian package --- .github/workflows/deploy.yml | 20 ++++++++++++++++++++ cli/Cargo.toml | 17 +++++++++++++++++ gui/Cargo.toml | 5 +++++ 3 files changed, 42 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ee44dcc..4298030 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -44,3 +44,23 @@ jobs: with: files: | win32_installer/*.exe + + deploy-linux: + if: startsWith(github.ref, 'refs/tags/') + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + - name: Install Packaging Tools + run: cargo install cargo-deb + - name: Build (Release) + run: cargo build --release --verbose + - name: Package (Debian) + run: | + cargo deb -p stm32tesseract --no-build --verbose + cargo deb -p stm32tesseract-gui --no-build --verbose + - name: Release (GitHub) + uses: softprops/action-gh-release@v1 + with: + files: | + target/debian/stm32tesseract_*.deb + target/debian/stm32tesseract-gui_*.deb diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 4d96a5a..5db69fd 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -2,6 +2,8 @@ name = "stm32tesseract" version = "0.1.1" edition = "2021" +authors = ["ArcticLampyrid "] +license = "BSD-3-Clause" [dependencies] clap = { version = "4.4.6", features = ["derive"] } @@ -27,3 +29,18 @@ semver = "1.0" [target.'cfg(windows)'.dependencies] winreg = "0.51.0" + +[package.metadata.deb] +depends = [] +assets = [ + [ + "target/release/stm32tesseract", + "usr/bin/", + "755", + ], + [ + "resources/**/*", + "var/lib/stm32tesseract/resources", + "644", + ], +] diff --git a/gui/Cargo.toml b/gui/Cargo.toml index 65f4334..5508402 100644 --- a/gui/Cargo.toml +++ b/gui/Cargo.toml @@ -3,6 +3,8 @@ name = "stm32tesseract-gui" version = "0.1.1" edition = "2021" build = "build.rs" +authors = ["ArcticLampyrid "] +license = "BSD-3-Clause" [dependencies] clap = { version = "4.4.6", features = ["derive"] } @@ -24,3 +26,6 @@ check_elevation = "0.2" [build-dependencies] slint-build = "1.0" embed-resource = "2.3" + +[package.metadata.deb] +depends = ["stm32tesseract"]