diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c4cd5cd..1854e08 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -49,6 +49,22 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # apt.lucapadovan.dev is rebuilt from the GitHub releases by + # padovanl/packages; this only starts that workflow, and is skipped + # while the token is missing. + apt: + needs: goreleaser + if: ${{ !contains(github.ref_name, '-') }} + runs-on: ubuntu-latest + env: + # Fine-grained token with Actions: read and write on padovanl/packages. + PACKAGES_DISPATCH_TOKEN: ${{ secrets.PACKAGES_DISPATCH_TOKEN }} + steps: + - if: env.PACKAGES_DISPATCH_TOKEN != '' + run: gh workflow run publish.yml --repo padovanl/packages + env: + GH_TOKEN: ${{ secrets.PACKAGES_DISPATCH_TOKEN }} + snap: runs-on: ubuntu-latest needs: goreleaser diff --git a/README.md b/README.md index a98c707..1d31c43 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ [![Downloads](https://img.shields.io/github/downloads/padovanl/pkgtui/total)](https://github.com/padovanl/pkgtui/releases) [![Go version](https://img.shields.io/github/go-mod/go-version/padovanl/pkgtui)](go.mod) [![License: MIT](https://img.shields.io/github/license/padovanl/pkgtui)](LICENSE) +[![APT](https://img.shields.io/endpoint?url=https%3A%2F%2Fapt.lucapadovan.dev%2Fbadges%2Fpkgtui.json&logo=debian)](#apt-repository-debianubuntu-and-derivatives) An **htop-style** terminal UI (TUI) to search, install, remove and upgrade packages from **apt**, **snap**, **flatpak**, **Homebrew** and **MacPorts**, @@ -162,7 +163,8 @@ own: ## 📥 Installation -No verification/store required: grab the asset from the [releases +On Debian and Ubuntu, the APT repository below keeps pkgtui up to date. +Otherwise, grab the asset from the [releases page](https://github.com/padovanl/pkgtui/releases) and install it locally. The `.deb` and `.snap` both register an application entry and icon, so pkgtui shows up in your desktop's app launcher (opening in a terminal, @@ -175,8 +177,23 @@ release](https://github.com/padovanl/pkgtui/releases/latest) rather than guessing. The commands use `-f` so curl fails loudly on a wrong URL instead of silently saving GitHub's "not found" page as if it were the package. +### APT repository (Debian/Ubuntu and derivatives) + +```bash +sudo install -d -m 0755 /etc/apt/keyrings +curl -fsSL https://apt.lucapadovan.dev/lucapadovan.gpg | sudo tee /etc/apt/keyrings/lucapadovan.gpg >/dev/null +echo "deb [signed-by=/etc/apt/keyrings/lucapadovan.gpg] https://apt.lucapadovan.dev stable main" \ + | sudo tee /etc/apt/sources.list.d/lucapadovan.list +sudo apt update && sudo apt install pkgtui +``` + +Updates then arrive with `apt upgrade`. The repository at +[apt.lucapadovan.dev](https://apt.lucapadovan.dev) serves amd64 and arm64. + ### `.deb` package (Debian/Ubuntu and derivatives) +A single package that does not update on its own; prefer the APT repository. + ```bash curl -fLO https://github.com/padovanl/pkgtui/releases/latest/download/pkgtui__amd64.deb sudo apt install ./pkgtui__amd64.deb diff --git a/docs/index.html b/docs/index.html index fb72934..91daeba 100644 --- a/docs/index.html +++ b/docs/index.html @@ -581,17 +581,26 @@

In action

Installation

-

No verification/store required — grab the asset that fits and install it locally.

+

On Debian and Ubuntu, the APT repository keeps pkgtui up to date. Every release asset is also available to install by hand.

- + +
-
-
# replace <version> with the latest release number, no leading "v"
+      
+
# Debian, Ubuntu and derivatives (amd64, arm64); updates arrive with apt upgrade
+sudo install -d -m 0755 /etc/apt/keyrings
+curl -fsSL https://apt.lucapadovan.dev/lucapadovan.gpg | sudo tee /etc/apt/keyrings/lucapadovan.gpg >/dev/null
+echo "deb [signed-by=/etc/apt/keyrings/lucapadovan.gpg] https://apt.lucapadovan.dev stable main" \
+  | sudo tee /etc/apt/sources.list.d/lucapadovan.list
+sudo apt update && sudo apt install pkgtui
+
+
+
# a single package that does not update on its own; replace <version> with the latest release number, no leading "v"
 curl -fLO https://github.com/padovanl/pkgtui/releases/latest/download/pkgtui_<version>_amd64.deb
 sudo apt install ./pkgtui_<version>_amd64.deb