diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..67e2f30 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,61 @@ +name: Release + +on: + push: + tags: + - 'v*' + +permissions: + contents: write + +jobs: + build-macos: + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - run: cargo build --release + - run: cargo test --release + - run: cargo clippy --release -- -D warnings + - uses: actions/upload-artifact@v4 + with: + name: lview-macos + path: target/release/lview + + build-linux: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - run: cargo install cargo-deb + - run: cargo build --release + - run: cargo test --release + - run: cargo clippy --release -- -D warnings + - run: cargo deb + - uses: actions/upload-artifact@v4 + with: + name: lview-linux + path: | + target/release/lview + target/debian/*.deb + + release: + needs: [build-macos, build-linux] + runs-on: ubuntu-latest + steps: + - uses: actions/download-artifact@v4 + with: + name: lview-macos + path: artifacts/macos + - uses: actions/download-artifact@v4 + with: + name: lview-linux + path: artifacts/linux + - name: Create Release + uses: softprops/action-gh-release@v2 + with: + files: | + artifacts/macos/lview + artifacts/linux/lview + artifacts/linux/*.deb + generate_release_notes: true diff --git a/Cargo.toml b/Cargo.toml index d2d2372..1a1f83e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,3 +22,14 @@ regex = "1.11.1" serde = { version = "1.0.217", features = ["derive"] } tokio = { version = "1.43.0", features = ["rt-multi-thread", "process", "io-util", "sync", "time", "macros"] } toml = "0.8.20" + +[package.metadata.deb] +maintainer = "janvete " +copyright = "2026, janvete" +extended-description = "TUI application for viewing remote logs over SSH." +section = "utils" +priority = "optional" +assets = [ + ["target/release/lview", "usr/bin/lview", "755"], + ["README.md", "usr/share/doc/lview/README.md", "644"], +] diff --git a/README.md b/README.md index 458b056..865a0bf 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,16 @@ brew tap janvete/tools brew install lview ``` +### Debian / Ubuntu (.deb) + +Stáhněte si nejnovější `.deb` z [GitHub Releases](https://github.com/janvete/lview/releases) a nainstalujte: + +```bash +sudo apt install ./lview_*.deb +# nebo +sudo dpkg -i ./lview_*.deb +``` + ### Ze zdroje ```bash