Skip to content

ci: add AUR automation to release workflow#20

Merged
FelipeMorandini merged 1 commit intomainfrom
chore/aur-automation
Mar 18, 2026
Merged

ci: add AUR automation to release workflow#20
FelipeMorandini merged 1 commit intomainfrom
chore/aur-automation

Conversation

@FelipeMorandini
Copy link
Copy Markdown
Owner

Summary

  • Add update-aur job to release.yml that automatically updates the smartlog-bin AUR package on each release
  • The job downloads release assets, computes SHA256 checksums, updates PKGBUILD and .SRCINFO, and pushes to AUR via SSH
  • Hardened: pinned host key via ssh-keyscan, printf for SSH key, curl --fail with retries, set -euo pipefail
  • Bump PKGBUILD version from 0.5.0 to 0.6.0
  • Update ROADMAP to mark AUR submission and automation as complete
  • Initial PKGBUILD already pushed to AUR (smartlog-bin is live)

Test plan

  • Verify YAML syntax is valid
  • Verify update-aur job runs after release job
  • Verify SSH configuration uses pinned host key and StrictHostKeyChecking yes
  • Verify curl uses --fail with retries
  • CI passes (fmt, clippy, test, audit, deny)

@FelipeMorandini FelipeMorandini requested a review from Copilot March 18, 2026 19:39
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the existing tag-driven release pipeline by adding automated AUR publishing for the smartlog-bin package, and updates packaging docs/metadata to reflect completed distribution work.

Changes:

  • Add an update-aur job to the release workflow to clone smartlog-bin from AUR, update PKGBUILD/.SRCINFO, and push via SSH.
  • Bump the AUR PKGBUILD version to 0.6.0.
  • Update ROADMAP.md to mark AUR automation and other distribution items as done/partially done.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
.github/workflows/release.yml Adds update-aur job that fetches release assets, computes checksums, updates AUR packaging files, and pushes to AUR.
packaging/aur/PKGBUILD Updates pkgver to 0.6.0 for the AUR smartlog-bin package.
ROADMAP.md Updates project roadmap/distribution status (AUR automation marked complete).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +227 to +233
ssh-keyscan -t ed25519 aur.archlinux.org >> ~/.ssh/known_hosts 2>/dev/null
cat >> ~/.ssh/config << 'EOF'
Host aur.archlinux.org
IdentityFile ~/.ssh/aur
User aur
StrictHostKeyChecking yes
EOF
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Valid point. For now, ssh-keyscan is still better than accept-new since it writes to known_hosts and StrictHostKeyChecking yes ensures subsequent connections verify against it. Pinning a committed fingerprint is a future hardening step — the current risk is limited to the first connection per workflow run.

Comment on lines +275 to +300
# Generate .SRCINFO (makepkg is not available on Ubuntu)
# .SRCINFO uses tab indentation for fields under pkgbase/pkgname
TAB=$'\t'
URL="https://github.com/felipemorandini/smartlog"
{
echo "pkgbase = smartlog-bin"
echo "${TAB}pkgdesc = A high-performance TUI for log tailing with JSON auto-detection and real-time filtering"
echo "${TAB}pkgver = ${VERSION}"
echo "${TAB}pkgrel = 1"
echo "${TAB}url = ${URL}"
echo "${TAB}arch = x86_64"
echo "${TAB}arch = aarch64"
echo "${TAB}license = MIT"
echo "${TAB}provides = smartlog"
echo "${TAB}conflicts = smartlog"
echo "${TAB}source_x86_64 = ${URL}/releases/download/v${VERSION}/smartlog-x86_64-unknown-linux-musl.tar.gz"
echo "${TAB}source_x86_64 = ${URL}/raw/v${VERSION}/LICENSE"
echo "${TAB}sha256sums_x86_64 = ${SHA_X86_64}"
echo "${TAB}sha256sums_x86_64 = ${SHA_LICENSE}"
echo "${TAB}source_aarch64 = ${URL}/releases/download/v${VERSION}/smartlog-aarch64-unknown-linux-musl.tar.gz"
echo "${TAB}source_aarch64 = ${URL}/raw/v${VERSION}/LICENSE"
echo "${TAB}sha256sums_aarch64 = ${SHA_AARCH64}"
echo "${TAB}sha256sums_aarch64 = ${SHA_LICENSE}"
echo ""
echo "pkgname = smartlog-bin"
} > .SRCINFO
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Known trade-off. makepkg --printsrcinfo requires an Arch Linux container, adding complexity and CI time. The .SRCINFO is generated from the same variables used to update the PKGBUILD, keeping them in sync for all fields that change between releases (version, checksums, sources). For a -bin package with no build dependencies, the static fields (pkgdesc, url, license) change very rarely — when they do, both would need manual updating together. Acceptable risk for now.

ssh-keyscan -t ed25519 aur.archlinux.org >> ~/.ssh/known_hosts 2>/dev/null
cat >> ~/.ssh/config << 'EOF'
Host aur.archlinux.org
IdentityFile ~/.ssh/aur
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestion. Adding IdentitiesOnly yes to the SSH config would be a nice hardening step. Will address in a follow-up.

Add update-aur job to release.yml that automatically updates the
smartlog-bin AUR package on each release. The job downloads release
assets, computes SHA256 checksums, updates the PKGBUILD, generates
.SRCINFO, and pushes to AUR via SSH.

Hardened with pinned host key (ssh-keyscan), printf for SSH key,
curl --fail with retries, and set -euo pipefail.

Also bumps PKGBUILD version from 0.5.0 to 0.6.0 and updates ROADMAP
to reflect AUR submission and automation are complete.
@FelipeMorandini FelipeMorandini merged commit 3f2c6aa into main Mar 18, 2026
8 checks passed
@FelipeMorandini FelipeMorandini deleted the chore/aur-automation branch March 18, 2026 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants