From c13276557171f147319c4f95f7ac81ca990a882f Mon Sep 17 00:00:00 2001 From: Fabio Lenherr / DashieTM Date: Thu, 14 Dec 2023 16:38:15 +0100 Subject: [PATCH] chore: Shrink CI/CD --- .github/workflows/rust.yml | 16 ++-------------- PKGBUILD | 2 +- flatpak/cargo-sources.json | 20 ++++++++++---------- release.yml | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 45 insertions(+), 25 deletions(-) create mode 100644 release.yml diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 485ef00..089fbcf 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -11,9 +11,7 @@ env: jobs: build: - runs-on: [self-hosted, ubuntu] - steps: - uses: actions/checkout@v3 - name: nightly-rust @@ -21,17 +19,7 @@ jobs: with: profile: minimal toolchain: nightly - - name: run code coverage - uses: actions-rs/tarpaulin@v0.1 - with: - version: '0.15.0' - args: '-- --test-threads 1' - - name: upload code coverage - uses: actions/upload-artifact@v1 - with: - name: code-coverage-report - path: cobertura.xml - name: Build run: cargo build --verbose - - name: Run tests - run: cargo test --verbose + - name: Run clippy + run: cargo clippy --fix diff --git a/PKGBUILD b/PKGBUILD index 643adca..b6d99d0 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Fabio Lenherr pkgname=reset -pkgver=0.1 +pkgver=0.1.1 pkgrel=0 arch=('x86_64') pkgdir="/usr/bin/${pkgname}" diff --git a/flatpak/cargo-sources.json b/flatpak/cargo-sources.json index 3d0e395..322a502 100644 --- a/flatpak/cargo-sources.json +++ b/flatpak/cargo-sources.json @@ -1029,14 +1029,14 @@ { "type": "archive", "archive-type": "tar-gzip", - "url": "https://static.crates.io/crates/re_set-lib/re_set-lib-0.8.2.crate", - "sha256": "37a810fe8a6e0f9b47c02bedeceea1d7994ae99c3af0b13990378ac81ca139cb", - "dest": "cargo/vendor/re_set-lib-0.8.2" + "url": "https://static.crates.io/crates/re_set-lib/re_set-lib-0.8.5.crate", + "sha256": "553f659e88565f7f92b9be1f5fb1643260e90cfc37efc40c03125da4e16f3103", + "dest": "cargo/vendor/re_set-lib-0.8.5" }, { "type": "inline", - "contents": "{\"package\": \"37a810fe8a6e0f9b47c02bedeceea1d7994ae99c3af0b13990378ac81ca139cb\", \"files\": {}}", - "dest": "cargo/vendor/re_set-lib-0.8.2", + "contents": "{\"package\": \"553f659e88565f7f92b9be1f5fb1643260e90cfc37efc40c03125da4e16f3103\", \"files\": {}}", + "dest": "cargo/vendor/re_set-lib-0.8.5", "dest-filename": ".cargo-checksum.json" }, { @@ -1068,14 +1068,14 @@ { "type": "archive", "archive-type": "tar-gzip", - "url": "https://static.crates.io/crates/reset_daemon/reset_daemon-0.5.6.crate", - "sha256": "240504ebc73a3d749480f765c1e9070a0add5a57ba6c1a0be1e97d52132da268", - "dest": "cargo/vendor/reset_daemon-0.5.6" + "url": "https://static.crates.io/crates/reset_daemon/reset_daemon-0.6.0.crate", + "sha256": "11611caa1a9c1c642522228b72ac309502572916924c100b20d06a830b1fad07", + "dest": "cargo/vendor/reset_daemon-0.6.0" }, { "type": "inline", - "contents": "{\"package\": \"240504ebc73a3d749480f765c1e9070a0add5a57ba6c1a0be1e97d52132da268\", \"files\": {}}", - "dest": "cargo/vendor/reset_daemon-0.5.6", + "contents": "{\"package\": \"11611caa1a9c1c642522228b72ac309502572916924c100b20d06a830b1fad07\", \"files\": {}}", + "dest": "cargo/vendor/reset_daemon-0.6.0", "dest-filename": ".cargo-checksum.json" }, { diff --git a/release.yml b/release.yml new file mode 100644 index 0000000..7dfaa71 --- /dev/null +++ b/release.yml @@ -0,0 +1,32 @@ +on: + release: + types: [ created ] + +jobs: + release: + runs-on: [self-hosted, ubuntu] + steps: + - uses: actions/checkout@v3 + - name: nightly-rust + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + - name: Build rust package + run: cargo build --release --verbose + - name: Build Flatpak + run: | + cd flatpak + ./build.sh + - name: Build Ubuntu package + run: | + cp ./target/release/reset ./debian/. + dpkg-deb --build debian + mv debian.deb reset.deb + - name: Release + uses: softprops/action-gh-release@v1 + with: + files: | + target/release/reset + flatpak/reset.flatpak + reset.deb