chore(deps): update dependency catppuccin/cursors to v0.4.0 (#55) #43
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish to AUR | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- '**/PKGBUILD' | |
jobs: | |
setup: | |
runs-on: ubuntu-latest | |
outputs: | |
pkgbuilds: ${{ steps.matrix.outputs.pkgbuilds }} | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: Find updated packages and construct matrix | |
id: matrix | |
run: | | |
#!/usr/bin/env bash | |
set -euxo pipefail | |
# Get all directories that have had edits made to their PKGBUILD or .SRCINFO in the last commit | |
dirs=$(git diff --name-only HEAD HEAD~1 "*/PKGBUILD" "*/.SRCINFO" | xargs dirname | sort | uniq) | |
# Convert dirs that have been changes to a JSON array | |
echo "pkgbuilds=$(printf '["%s"]' "$(echo "$dirs" | sed ':a;N;$!ba;s/\n/","/g')")" >> $GITHUB_OUTPUT | |
publish: | |
runs-on: ubuntu-latest | |
needs: [ setup ] | |
strategy: | |
matrix: | |
pkgbuild: ${{fromJSON(needs.setup.outputs.pkgbuilds)}} | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Get pkgname | |
run: echo "pkgname=$(basename ${{ matrix.pkgbuild }})" >> $GITHUB_ENV | |
- name: Get additional assets | |
run: | | |
#!/usr/bin/env bash | |
set -euxo pipefail | |
assets_txt='${{ matrix.pkgbuild }}/assets.txt' | |
if [ ! -f $assets_txt ]; then | |
echo "assets=" >> $GITHUB_ENV | |
else | |
glob=$(cat "$assets_txt") | |
echo "assets=$(echo -n $glob)" >> $GITHUB_ENV | |
fi | |
- name: Publish packages without assets | |
uses: KSXGitHub/[email protected] | |
if: ${{ matrix.pkgbuild != '' && env.assets == '' }} | |
with: | |
pkgname: ${{ env.pkgname }} | |
pkgbuild: ${{ matrix.pkgbuild }}/PKGBUILD | |
commit_username: ${{ secrets.AUR_USERNAME }} | |
commit_email: ${{ secrets.AUR_EMAIL }} | |
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }} | |
- name: Publish packages with assets | |
uses: KSXGitHub/[email protected] | |
if: ${{ matrix.pkgbuild != '' && env.assets != '' }} | |
with: | |
pkgname: ${{ env.pkgname }} | |
assets: ${{ matrix.pkgbuild }}/${{ env.assets }} | |
pkgbuild: ${{ matrix.pkgbuild }}/PKGBUILD | |
commit_username: ${{ secrets.AUR_USERNAME }} | |
commit_email: ${{ secrets.AUR_EMAIL }} | |
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }} |