name: Publish to AUR
on:
workflow_run:
workflows: ["Build and Release"]
types: [completed]
workflow_dispatch:
inputs:
tag:
description: "Tag to publish (e.g. v0.9.0)"
required: true
type: string
permissions:
contents: read
jobs:
publish-aur:
if: >-
github.event_name == 'workflow_dispatch' ||
(github.event.workflow_run.conclusion == 'success' &&
startsWith(github.event.workflow_run.head_branch, 'v'))
runs-on: ubuntu-latest
steps:
- name: Resolve tag
id: tag
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
TAG="${{ inputs.tag }}"
else
TAG="${{ github.event.workflow_run.head_branch }}"
fi
echo "tag=${TAG}" >> "$GITHUB_OUTPUT"
echo "version=${TAG#v}" >> "$GITHUB_OUTPUT"
- uses: actions/checkout@v4
with:
ref: ${{ steps.tag.outputs.tag }}
- name: Update pkgver in PKGBUILD
run: |
sed -i "s/^pkgver=.*/pkgver=${{ steps.tag.outputs.version }}/" packaging/aur/PKGBUILD
sed -i "s/^pkgrel=.*/pkgrel=1/" packaging/aur/PKGBUILD
- name: Publish to AUR
uses: KSXGitHub/github-actions-deploy-aur@v4.1.3
with:
pkgname: clickup-cli-bin
pkgbuild: packaging/aur/PKGBUILD
commit_username: Nicholas Bester
commit_email: 1872093+nicholasbester@users.noreply.github.com
ssh_private_key: ${{ secrets.AUR_SSH_KEY }}
commit_message: "Update to v${{ steps.tag.outputs.version }}"
updpkgsums: true
ssh_keyscan_types: rsa,ecdsa,ed25519