Release to AUR #14
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: Release to AUR | |
on: | |
workflow_dispatch: | |
inputs: | |
test: | |
description: 'Ignore this' | |
required: true | |
default: true | |
workflow_run: | |
workflows: ["Release"] | |
types: | |
- completed | |
env: | |
APP_NAME: simplemoji | |
jobs: | |
publish_aur_package: | |
name: Publish AUR package | |
runs-on: ubuntu-latest | |
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event.inputs.test }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: x86_64-unknown-linux-gnu | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install cargo-aur | |
run: cargo install --git https://github.com/SergioRibera/cargo-pkgbuild --branch dev | |
- name: "Download Github Artifacts" | |
run: curl -O "https://github.com/SergioRibera/simplemoji/releases/download/$(git describe --tags --abbrev=0)/simplemoji-x86_64-unknown-linux-gnu.tar.xz" | |
- name: Generate PKGBUILD | |
run: cargo-aur -o . generate simplemoji-x86_64-unknown-linux-gnu.tar.xz | |
- name: Publish to the AUR | |
uses: KSXGitHub/[email protected] | |
with: | |
pkgname: ${{ env.APP_NAME }} | |
pkgbuild: ./PKGBUILD | |
commit_username: ${{ secrets.AUR_USERNAME }} | |
commit_email: ${{ secrets.AUR_EMAIL }} | |
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }} | |
commit_message: ${{ github.ref_name }} |