Skip to content

Add AUR (Arch Linux User Repository) packaging and auto-publish workflow#91

Open
mekwall wants to merge 1 commit into
gildas:devfrom
mekwall:feature/aur-packaging
Open

Add AUR (Arch Linux User Repository) packaging and auto-publish workflow#91
mekwall wants to merge 1 commit into
gildas:devfrom
mekwall:feature/aur-packaging

Conversation

@mekwall
Copy link
Copy Markdown

@mekwall mekwall commented May 18, 2026

Summary

Adds packaging support for the Arch Linux User Repository (AUR), alongside the existing deb/rpm/snap/chocolatey/homebrew packaging.

The package is published as bitbucket-cli-bin — a -bin variant that ships pre-built binaries from GitHub releases.

What's included

File Purpose
packaging/aur/PKGBUILD Package definition with real SHA256 checksums, LICENSE installation, optdepends for Secret Service backend, and shell completions (bash, zsh, fish)
packaging/aur/.SRCINFO Machine-readable package metadata
.github/workflows/publish-aur.yml GitHub Action — auto-publishes to AUR on release. Uses updpkgsums with manual fallback, pinned action commit SHA for supply chain security
README.md Added Arch Linux installation section

Setup instructions (one-time, for the maintainer)

The GitHub Action can only update an existing AUR package. The initial submission must be done manually.

1. Create an AUR account

Register at https://aur.archlinux.org/register

2. Generate an SSH key for CI

ssh-keygen -t ed25519 -C "github-actions@bitbucket-cli"

3. Add the public key to your AUR account

Go to https://aur.archlinux.org → Account → SSH Keys → paste the public key

4. Add GitHub repository secrets

In this repo's Settings → Secrets and variables → Actions, add:

Secret Value
AUR_SSH_PRIVATE_KEY The ed25519 private key (full contents)
AUR_USERNAME Your AUR username
AUR_EMAIL Your AUR email

5. Create the initial AUR package (one-time, manual)

git clone ssh://aur@aur.archlinux.org/bitbucket-cli-bin.git
cd bitbucket-cli-bin
cp /path/to/bitbucket-cli/packaging/aur/PKGBUILD .
cp /path/to/bitbucket-cli/packaging/aur/.SRCINFO .
sed -i "s/^pkgver=.*/pkgver=0.18.0/" PKGBUILD
updpkgsums
makepkg --printsrcinfo > .SRCINFO
git add PKGBUILD .SRCINFO
git commit -m "Initial upload: bitbucket-cli-bin 0.18.0"
git push

After this, every new GitHub release will automatically update the AUR package via the workflow.

Notes

  • Runtime dependency: gnome-keyring (optdepends) — provides the Secret Service daemon needed by go-keyring for credential storage. libsecret alone is a client library without a running daemon.
  • License: MIT — automatically installed to /usr/share/licenses/bitbucket-cli-bin/LICENSE
  • Dual architecture: x86_64 and aarch64
  • Shell completions: bash, zsh, fish
  • Supply chain security: The AUR publish action is pinned to commit da03e160 (v4.1.3) rather than a mutable tag

Copilot AI review requested due to automatic review settings May 18, 2026 08:28
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

Adds Arch Linux AUR packaging support for the existing bb release distribution flow, including package metadata, an automated publish workflow, and README installation guidance.

Changes:

  • Adds AUR PKGBUILD and .SRCINFO for bitbucket-cli-bin.
  • Adds a GitHub Actions workflow to publish release updates to AUR.
  • Documents Arch Linux installation via AUR helpers.

Reviewed changes

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

File Description
README.md Adds Arch Linux AUR install instructions.
packaging/aur/PKGBUILD Defines the AUR binary package and shell completion installation.
packaging/aur/.SRCINFO Adds machine-readable AUR metadata.
.github/workflows/publish-aur.yml Adds release-triggered AUR publishing workflow.

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

Comment thread .github/workflows/publish-aur.yml Outdated
Comment thread .github/workflows/publish-aur.yml Outdated
Comment thread packaging/aur/PKGBUILD Outdated
Comment thread packaging/aur/.SRCINFO Outdated
Comment thread packaging/aur/PKGBUILD
Comment thread packaging/aur/PKGBUILD Outdated
Comment thread packaging/aur/.SRCINFO Outdated
Comment thread .github/workflows/publish-aur.yml Outdated
Adds packaging files for publishing bitbucket-cli to the AUR as a
-binary package (pre-built binaries from GitHub releases).

Included:
- packaging/aur/PKGBUILD: Package definition with real SHA256 checksums,
  LICENSE installation, optdepends for Secret Service backend, and shell
  completions for bash, zsh, and fish
- packaging/aur/.SRCINFO: Machine-readable package metadata
- .github/workflows/publish-aur.yml: GitHub Action that auto-publishes
  to AUR on release. Uses updpkgsums with manual fallback, pinned
  action commit SHA for supply chain security
- README.md: Added Arch Linux installation instructions

Setup instructions for the maintainer:
1. Create an AUR account at https://aur.archlinux.org/register
2. Generate an ed25519 SSH key pair for CI:
   ssh-keygen -t ed25519 -C 'github-actions@bitbucket-cli'
3. Add the public key to your AUR account
4. Add GitHub repository secrets:
   - AUR_SSH_PRIVATE_KEY: The private key
   - AUR_USERNAME: Your AUR username
   - AUR_EMAIL: Your AUR email
5. Create the initial AUR package (one-time, manual):
   git clone ssh://aur@aur.archlinux.org/bitbucket-cli-bin.git
   cd bitbucket-cli-bin
   cp /path/to/bitbucket-cli/packaging/aur/PKGBUILD .
   cp /path/to/bitbucket-cli/packaging/aur/.SRCINFO .
   # Update version and checksums for current release
   sed -i 's/^pkgver=.*/pkgver=0.18.0/' PKGBUILD
   updpkgsums
   makepkg --printsrcinfo > .SRCINFO
   git add PKGBUILD .SRCINFO
   git commit -m 'Initial upload: bitbucket-cli-bin 0.18.0'
   git push
6. Subsequent releases auto-update via this workflow
@mekwall mekwall force-pushed the feature/aur-packaging branch from 8e2749d to ce53d3d Compare May 19, 2026 15:18
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