Publish an update to an existing AUR package.
The bin/aur-publish
script automates the following typical process for
releasing a new version of an AUR package:
- Clone the
aur
repository - Update
pkgver
andpkgrel
- Update the checksums and
.SRCINFO
file - Commit and push
This repository wraps that script in a Docker image and GitHub Action, allowing fully automating the release of a project through to publishing it to the AUR.
Important
The script has special-handling for versions with hyphens, which are not
allowed in Arch Linux. It will replace any hyphens with underscores when
setting the pkgver
in the PKGBUILD
. If you expect this to occur, your
PKGBUILD
must take care to restore those hyphens where it matters, such as
when fetching sources.
See the wiki.
You can place bin/aur-publish
on $PATH
and use it directly.
Note
This will skip any SSH configuration before cloning; you are expected to have that pre-configured.
% aur-publish --help
aur-publish --version=VERSION [--release=NUMBER] [--[no-]publish] PACKAGE
Update an existing PKGBUILD's pkgver and publish
Options:
--version VERSION Updated pkgver, required
--release NUMBER Updated pkgrel, default is 1
--git-email EMAIL If given, set this git email before comitting
--git-username NAME If given, set this git username before comitting
--[no-]publish Actually push to the AUR repository or not,
default is NOT to publish
-h, --help Show this usage
PACKAGE Name of AUR package to publish
Environment:
SSH_PRIVATE_KEY Private key with AUR access, if run in Docker
% docker build --tag aur-publish .
% docker run -it --rm \
--env "SSH_PRIVATE_KEY=$(< ~/.ssh/aur)" \
aur-publish \
aur-publish downgrade \
--version "11.5.1-rc-aur.1" \
--git-email "$(git config get user.email)" \
--git-username "$(git config get user.name)" \
--no-publish
# .github/workflows/release.yml
jobs:
release:
# ...
outputs:
published: # true if a release occurred
version: # the version that was released
pkgbuild:
needs: [release]
if: ${{ needs.release.outputs.published == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: archlinux-downgrade/aur-publish-action@v1
with:
package: downgrade
version: ${{ needs.release.outputs.version }}
publish: ${{ github.ref_name == 'main' }}
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
See downgrade
for a complete example.
name | description | required | default |
---|---|---|---|
package |
Name of the AUR package to publish |
true |
"" |
version |
Updated |
true |
"" |
release |
Updated |
false |
1 |
git-email |
|
false |
${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com |
git-username |
|
false |
${{ github.actor }} |
publish |
Actually publish? |
false |
true |
The action is licensed AGPLv3. See COPYING.