Skip to content

feat(cli): add setup-renderdoc command for one-step install (#181) #24

feat(cli): add setup-renderdoc command for one-step install (#181)

feat(cli): add setup-renderdoc command for one-step install (#181) #24

Workflow file for this run

name: AUR Publish
on:
push:
branches: [master]
paths: ["aur/PKGBUILD"]
tags: ["v*"]
workflow_dispatch:
inputs:
version:
description: "Version to publish (e.g. 0.4.1)"
required: true
permissions:
contents: read
jobs:
aur-git:
name: Publish rdc-cli-git
runs-on: ubuntu-latest
if: github.ref_type == 'branch' && github.event_name != 'workflow_dispatch'
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: KSXGitHub/github-actions-deploy-aur@2ac5a4c1d7035885d46b10e3193393be8460b6f1 # v4.1.1
with:
pkgname: rdc-cli-git
pkgbuild: aur/PKGBUILD
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
commit_message: "Update PKGBUILD"
aur-stable:
name: Publish rdc-cli (stable)
runs-on: ubuntu-latest
if: github.ref_type == 'tag' || github.event_name == 'workflow_dispatch'
steps:
- name: Normalize version
id: ver
env:
INPUT_VERSION: ${{ github.event.inputs.version }}
run: |
if [ -n "${INPUT_VERSION}" ]; then
echo "version=${INPUT_VERSION#v}" >> "$GITHUB_OUTPUT"
else
echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
fi
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ steps.ver.outputs.version && format('refs/tags/v{0}', steps.ver.outputs.version) || github.ref }}
- name: Compute tarball sha256
id: sha
env:
VERSION: ${{ steps.ver.outputs.version }}
run: |
SHA=$(curl -fsSL "https://github.com/BANANASJIM/rdc-cli/archive/refs/tags/v${VERSION}.tar.gz" | sha256sum | awk '{print $1}')
echo "sha256=${SHA}" >> "$GITHUB_OUTPUT"
- name: Patch PKGBUILD
env:
VERSION: ${{ steps.ver.outputs.version }}
SHA256: ${{ steps.sha.outputs.sha256 }}
run: |
sed -i "s/^pkgver=.*/pkgver=${VERSION}/" aur/stable/PKGBUILD
sed -i "s/'PLACEHOLDER'/'${SHA256}'/" aur/stable/PKGBUILD
- uses: KSXGitHub/github-actions-deploy-aur@2ac5a4c1d7035885d46b10e3193393be8460b6f1 # v4.1.1
with:
pkgname: rdc-cli
pkgbuild: aur/stable/PKGBUILD
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
commit_message: "Update rdc-cli to v${{ steps.ver.outputs.version }}"