Compare commits

..

12 commits
v0.1.1 ... main

Author SHA1 Message Date
SW
76824346b8 chore: update formula to v0.1.4, build from Forgejo source archive 2026-09-14 16:50:54 +02:00
SW
7e7cf1cf65 ci: remove corrupted .deb files before dpkg-scanpackages
All checks were successful
Release / release (push) Successful in 33s
2026-09-10 15:43:19 +02:00
SW
55e4539bf7 ci: build .deb manually with dpkg-deb instead of cargo-deb
Some checks failed
Release / release (push) Failing after 33s
2026-09-10 15:38:09 +02:00
SW
d5eaea9600 ci: use cargo deb without --no-build, add .deb debug output
Some checks failed
Release / release (push) Failing after 1m11s
2026-09-10 15:29:16 +02:00
SW
0a89020ce1 ci: drop macOS build and Homebrew tap, keep Linux + .deb + APT only
Some checks failed
Release / release (push) Failing after 1m11s
2026-09-10 15:23:11 +02:00
SW
e831dd1eb1 ci: make macOS build optional, skip Homebrew tap if it fails
Some checks failed
Release / release (push) Has been cancelled
2026-09-10 15:14:57 +02:00
SW
e0394a0a0f ci: install zig into /usr/local/bin with symlink
Some checks failed
Release / release (push) Failing after 2m48s
2026-09-10 15:01:07 +02:00
SW
1f42ba75f2 ci: download zig binary directly instead of apt
Some checks failed
Release / release (push) Has been cancelled
2026-09-10 14:58:45 +02:00
SW
45ad565459 ci: install zig for cargo-zigbuild macOS cross-compile
Some checks failed
Release / release (push) Failing after 2s
2026-09-10 14:55:59 +02:00
SW
b4afe150e8 ci: fix SSH deploy key mount path for Forgejo runner
Some checks are pending
Release / release (push) Waiting to run
2026-09-10 14:51:49 +02:00
SW
8bbe2fbde8 ci: switch release workflow to Forgejo, update repo URLs
Some checks failed
Release / release (push) Failing after 45s
- Add Forgejo release workflow with .deb, Homebrew tap and APT updates.
- Remove obsolete GitHub Actions release workflow.
- Update Cargo.toml repository and homepage URLs to git.janvete.com.
2026-09-10 14:37:49 +02:00
SW
5253514d4c docs: update install instructions for Forgejo 2026-09-10 14:22:15 +02:00
5 changed files with 178 additions and 83 deletions

View file

@ -0,0 +1,165 @@
name: Release
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
container:
image: rust:bookworm
volumes:
- /opt/runner/keys:/keys:ro
steps:
- name: Install tools
run: |
apt-get update
apt-get install -y dpkg-dev git curl openssh-client
- name: Setup SSH
run: |
test -r /keys/forgejo_runner || { echo "Deploy key /keys/forgejo_runner chybi"; exit 1; }
install -m 600 /keys/forgejo_runner /tmp/forgejo_runner
echo "GIT_SSH_COMMAND=ssh -p 554 -i /tmp/forgejo_runner -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR" >> "$GITHUB_ENV"
- name: Checkout source
run: |
git clone ssh://git@git-ssh.janvete.com:554/seth/resticview.git src
cd src
git checkout "${{ github.ref_name }}"
- name: Build Linux release binary and .deb
working-directory: src
run: |
VERSION=${{ github.ref_name }}
VER=${VERSION#v}
mkdir -p dist
cargo build --release
# .deb package
DEB_DIR="resticview_${VER}_amd64"
mkdir -p "${DEB_DIR}/DEBIAN" "${DEB_DIR}/usr/bin"
cp target/release/resticview "${DEB_DIR}/usr/bin/resticview"
chmod 755 "${DEB_DIR}/usr/bin/resticview"
cat > "${DEB_DIR}/DEBIAN/control" << CONTROL
Package: resticview
Version: ${VER}
Section: utils
Priority: optional
Architecture: amd64
Maintainer: janvete <jan.vete@example.com>
Description: TUI browser for restic backup repositories
CONTROL
dpkg-deb --build "${DEB_DIR}" "dist/${DEB_DIR}.deb"
# Linux tarball
STAGING=$(mktemp -d)
cp target/release/resticview "${STAGING}/resticview"
tar -czf "dist/resticview-${VERSION}-linux-amd64.tar.gz" -C "${STAGING}" resticview
rm -rf "${STAGING}"
- name: Print checksums
working-directory: src
run: |
echo "=== SHA256 checksums ==="
sha256sum dist/*
- name: Create Forgejo Release
working-directory: src
env:
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
FORGEJO_URL: https://git.janvete.com
run: |
VERSION=${{ github.ref_name }}
API="${FORGEJO_URL}/api/v1/repos/seth/resticview"
RELEASE_JSON=$(curl -sS -H "Authorization: token ${FORGEJO_TOKEN}" \
-H "Content-Type: application/json" \
-X POST \
-d "{\"tag_name\":\"${VERSION}\",\"name\":\"${VERSION}\",\"draft\":false,\"prerelease\":false}" \
"${API}/releases")
echo "Create release response: ${RELEASE_JSON}"
RELEASE_ID=$(echo "${RELEASE_JSON}" | grep -o '"id":[0-9]*' | head -1 | cut -d: -f2)
if [ -z "${RELEASE_ID}" ]; then
echo "Release may already exist, fetching existing release..."
EXISTING=$(curl -sS -H "Authorization: token ${FORGEJO_TOKEN}" \
"${API}/releases/tags/${VERSION}")
echo "Existing release response: ${EXISTING}"
RELEASE_ID=$(echo "${EXISTING}" | grep -o '"id":[0-9]*' | head -1 | cut -d: -f2)
fi
if [ -z "${RELEASE_ID}" ]; then
echo "Failed to create or fetch release"
exit 1
fi
for ARCHIVE in dist/*; do
[ -e "${ARCHIVE}" ] || continue
NAME=$(basename "${ARCHIVE}")
case "${NAME}" in
*.tar.gz) CONTENT_TYPE="application/gzip" ;;
*.deb) CONTENT_TYPE="application/vnd.debian.binary-package" ;;
*) CONTENT_TYPE="application/octet-stream" ;;
esac
curl -sS -H "Authorization: token ${FORGEJO_TOKEN}" \
-H "Content-Type: ${CONTENT_TYPE}" \
--data-binary "@${ARCHIVE}" \
"${API}/releases/${RELEASE_ID}/assets?name=${NAME}"
echo "Uploaded ${NAME}"
done
- name: Update APT repository
working-directory: src
run: |
VERSION=${{ github.ref_name }}
git clone ssh://git@git-ssh.janvete.com:554/seth/apt.git apt-repo
cp dist/*.deb apt-repo/
cd apt-repo
# Remove any corrupted .deb files left from previous failed runs
for f in *.deb; do
[ -e "$f" ] || continue
if ! dpkg-deb -I "$f" >/dev/null 2>&1; then
echo "Removing corrupted package: $f"
rm -f "$f"
fi
done
dpkg-scanpackages . > Packages
gzip -k -f Packages
cat > Release << RELEASE
Origin: janvete
Label: janvete
Suite: stable
Codename: stable
Version: 1.0
Architectures: amd64
Components: main
Description: janvete tools APT repository
Date: $(date -Ru)
RELEASE
{
echo "SHA256:"
for f in Packages Packages.gz *.deb; do
[ -e "$f" ] || continue
printf " %s %16d %s\n" "$(sha256sum "$f" | cut -d' ' -f1)" "$(stat -c%s "$f")" "$f"
done
} >> Release
git config user.email "forgejo-actions[bot]@janvete.com"
git config user.name "forgejo-actions[bot]"
git add -A
git commit -m "chore: add resticview ${VERSION}"
git push

View file

@ -1,70 +0,0 @@
name: Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
tag:
description: 'Tag to release (e.g. v0.1.6)'
required: true
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
- run: cp target/release/resticview target/release/resticview-macos
- uses: actions/upload-artifact@v4
with:
name: resticview-macos
path: target/release/resticview-macos
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
- run: cp target/release/resticview target/release/resticview-linux
- uses: actions/upload-artifact@v4
with:
name: resticview-linux
path: |
target/release/resticview-linux
target/debian/*.deb
release:
needs: [build-macos, build-linux]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: resticview-macos
path: artifacts/macos
- uses: actions/download-artifact@v4
with:
name: resticview-linux
path: artifacts/linux
- name: Create Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.event.inputs.tag || github.ref_name }}
files: |
artifacts/macos/resticview-macos
artifacts/linux/release/resticview-linux
artifacts/linux/debian/*.deb
generate_release_notes: true
overwrite_files: true

View file

@ -5,8 +5,8 @@ edition = "2024"
authors = ["janvete"] authors = ["janvete"]
description = "TUI browser for restic backup repositories" description = "TUI browser for restic backup repositories"
license = "MIT" license = "MIT"
repository = "https://github.com/janvete/resticview" repository = "https://git.janvete.com/seth/resticview"
homepage = "https://github.com/janvete/resticview" homepage = "https://git.janvete.com/seth/resticview"
keywords = ["cli", "tui", "restic", "backup"] keywords = ["cli", "tui", "restic", "backup"]
categories = ["command-line-utilities"] categories = ["command-line-utilities"]

View file

@ -1,10 +1,10 @@
class Resticview < Formula class Resticview < Formula
desc "TUI browser for restic backup repositories" desc "TUI browser for restic backup repositories"
homepage "https://github.com/janvete/resticview" homepage "https://git.janvete.com/seth/resticview"
url "https://github.com/janvete/resticview/archive/refs/tags/v0.1.0.tar.gz" url "https://git.janvete.com/seth/resticview/archive/v0.1.4.tar.gz"
sha256 "89aa460304da090dc7eb3b6bada06c91ad7bc72387b12c1fbbd11cf877726201" sha256 "79de9f0e8ecac078094e457677c316c6f0a37ca87de36d82ec0723c283aaa4b2"
license "MIT" license "MIT"
head "https://github.com/janvete/resticview.git", branch: "main" head "https://git.janvete.com/seth/resticview.git", branch: "main"
depends_on "rust" => :build depends_on "rust" => :build

View file

@ -7,23 +7,23 @@ A TUI browser for restic backup repositories. Browse snapshots, explore the file
### macOS (Homebrew) ### macOS (Homebrew)
```bash ```bash
brew tap janvete/tools brew tap janvete/tools https://git.janvete.com/seth/homebrew-tools.git
brew install resticview brew install resticview
``` ```
### Debian / Ubuntu (.deb) ### Debian / Ubuntu (.deb)
Download the latest `.deb` from [GitHub Releases](https://github.com/janvete/resticview/releases) and install it: Add the janvete APT repository and install:
```bash ```bash
sudo apt install ./resticview_*.deb echo "deb [trusted=yes] https://git.janvete.com/seth/apt/raw/branch/main ./" | sudo tee /etc/apt/sources.list.d/janvete.list
# or sudo apt update
sudo dpkg -i resticview_*.deb sudo apt install resticview
``` ```
### Prebuilt binaries ### Prebuilt binaries
Each [release](https://github.com/janvete/resticview/releases) also ships standalone binaries: `resticview-macos` (Apple Silicon) and `resticview-linux` (x86_64). Put the file on your `PATH` and make it executable: Each [release](https://git.janvete.com/seth/resticview/releases) also ships standalone binaries: `resticview-macos` (Apple Silicon) and `resticview-linux` (x86_64). Put the file on your `PATH` and make it executable:
```bash ```bash
chmod +x resticview-linux chmod +x resticview-linux
@ -33,7 +33,7 @@ sudo mv resticview-linux /usr/local/bin/resticview
### From source ### From source
```bash ```bash
cargo install --git https://github.com/janvete/resticview cargo install --git ssh://git@git-ssh.janvete.com:554/seth/resticview
``` ```
`restic` must be installed and on `PATH`. `restic` must be installed and on `PATH`.