clickup-cli 0.9.1

CLI for the ClickUp API, optimized for AI agents
Documentation
name: Publish to AUR

# The `release: [released]` trigger does not fire for releases created by
# softprops/action-gh-release via the default GITHUB_TOKEN (GitHub's
# anti-loop safeguard — events created by GITHUB_TOKEN don't trigger
# downstream workflows). Instead, run after "Build and Release" completes
# successfully on a tag push. Also exposed via workflow_dispatch for
# manual reruns.

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:
    # For workflow_run: only run after a successful tag-triggered Build and Release.
    # For workflow_dispatch: always run.
    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