Skip to content

aur-publish

aur-publish #43

Workflow file for this run

name: aur-publish
on:
workflow_run:
workflows: ["Rust"]
types:
- completed
# github.event.workflow_run.head_branch is the tag value without any prefix
branches:
- v[0-9]*
jobs:
aur-publish:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
strategy:
matrix:
package:
- name: timer-rs
pkgbuild: PKGBUILD
- name: timer-rs-bin
pkgbuild: PKGBUILD-bin
steps:
- uses: actions/checkout@v6
- name: Extract crate information
shell: bash
run: |
echo "PROJECT_VERSION=$(sed -n 's/^version = "\(.*\)"/\1/p' ./Cargo.toml | head -n1)" >> $GITHUB_ENV
- name: Create PKGBUILD
shell: bash
run: |
curl -s https://api.github.com/repos/rash-sh/rash/releases/latest \
| grep browser_download_url \
| grep -v sha256 \
| grep x86_64 \
| grep linux \
| grep gnu \
| cut -d '"' -f 4 \
| xargs curl -L \
| tar xvz -C /usr/local/bin
.ci/generate-pkgbuild.rh ${{ matrix.package.pkgbuild }}
- name: Publish AUR package
uses: KSXGitHub/github-actions-deploy-aur@v4.1.3
with:
pkgname: ${{ matrix.package.name }}
pkgbuild: ./${{ matrix.package.pkgbuild }}
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
commit_message: Update ${{ matrix.package.name }} AUR package to version ${{ env.PROJECT_VERSION }}
ssh_keyscan_types: rsa,ed25519