diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 50ee4ae..0159528 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -49,6 +49,8 @@ jobs: contents: write # create the GitHub release packages: write # push the image to ghcr.io id-token: write # keyless cosign signing + env: + LINUX_REPO_DISPATCH_TOKEN: ${{ secrets.LINUX_REPO_DISPATCH_TOKEN }} steps: - uses: actions/checkout@v7.0.0 with: @@ -85,3 +87,15 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }} SCOOP_BUCKET_GITHUB_TOKEN: ${{ secrets.SCOOP_BUCKET_GITHUB_TOKEN }} + + # Rebuild the Linux apt/dnf repository with the packages just released. + # Skipped when the dispatch token is unset, so the release never depends + # on it being configured. + - name: Refresh the Linux package repository + if: env.LINUX_REPO_DISPATCH_TOKEN != '' + run: | + curl -fsS -X POST \ + -H "Authorization: Bearer $LINUX_REPO_DISPATCH_TOKEN" \ + -H "Accept: application/vnd.github+json" \ + https://api.github.com/repos/tamnd/linux-repo/dispatches \ + -d '{"event_type":"package-released"}' diff --git a/README.md b/README.md index 1525971..6f2f974 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Full docs and guides live at **[kage.tamnd.com](https://kage.tamnd.com)**. go install github.com/tamnd/kage/cmd/kage@latest ``` -Prefer a prebuilt binary? Grab an archive, a `.deb`/`.rpm`/`.apk`, or a checksum from [releases](https://github.com/tamnd/kage/releases). On a Mac or Windows box, the package managers know it: +Prefer a prebuilt binary? Grab an archive, a `.deb`/`.rpm`/`.apk`, or a checksum from [releases](https://github.com/tamnd/kage/releases). Or let a package manager handle it: ```bash # Homebrew (macOS) @@ -33,6 +33,15 @@ brew install tamnd/tap/kage # Scoop (Windows) scoop bucket add tamnd https://github.com/tamnd/scoop-bucket scoop install kage + +# apt (Debian, Ubuntu) +curl -fsSL https://tamnd.github.io/linux-repo/gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/tamnd.gpg +echo "deb [signed-by=/usr/share/keyrings/tamnd.gpg] https://tamnd.github.io/linux-repo/apt stable main" | sudo tee /etc/apt/sources.list.d/tamnd.list +sudo apt update && sudo apt install kage + +# dnf (Fedora, RHEL) +sudo dnf config-manager --add-repo https://tamnd.github.io/linux-repo/dnf/tamnd.repo +sudo dnf install kage ``` Or skip installing Chrome yourself and use the container image, which bundles Chromium: diff --git a/docs/content/getting-started/installation.md b/docs/content/getting-started/installation.md index 5db19f5..5654f26 100644 --- a/docs/content/getting-started/installation.md +++ b/docs/content/getting-started/installation.md @@ -28,13 +28,31 @@ scoop bucket add tamnd https://github.com/tamnd/scoop-bucket scoop install kage ``` +## Linux (apt and dnf) + +A signed apt and dnf repository tracks every release, so `apt upgrade` and +`dnf upgrade` keep kage current. + +```bash +# Debian, Ubuntu +curl -fsSL https://tamnd.github.io/linux-repo/gpg.key \ + | sudo gpg --dearmor -o /usr/share/keyrings/tamnd.gpg +echo "deb [signed-by=/usr/share/keyrings/tamnd.gpg] https://tamnd.github.io/linux-repo/apt stable main" \ + | sudo tee /etc/apt/sources.list.d/tamnd.list +sudo apt update && sudo apt install kage + +# Fedora, RHEL +sudo dnf config-manager --add-repo https://tamnd.github.io/linux-repo/dnf/tamnd.repo +sudo dnf install kage +``` + ## Release archives and Linux packages Every [release](https://github.com/tamnd/kage/releases) attaches `tar.gz` archives (and a `.zip` for Windows) for Linux, macOS, Windows, and FreeBSD, plus `.deb`, `.rpm`, and `.apk` packages and a `checksums.txt` with a cosign signature. Download the one for your platform, extract `kage`, and put it on your -`PATH`. +`PATH`. To install a package directly without the repo above: ```bash # Debian/Ubuntu