-
Notifications
You must be signed in to change notification settings - Fork 7
43 lines (38 loc) · 1.37 KB
/
aur-publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: aur-publish
on:
push:
tags:
- '*'
jobs:
aur-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Extract crate information
shell: bash
run: |
echo "PROJECT_NAME=rash" >> $GITHUB_ENV
echo "PROJECT_VERSION=$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -n1)" >> $GITHUB_ENV
echo "PROJECT_DESCRIPTION=$(sed -n 's/^description = "\(.*\)"/\1/p' rash_core/Cargo.toml)" >> $GITHUB_ENV
echo "PROJECT_HOMEPAGE=$(sed -n 's/^homepage = "\(.*\)"/\1/p' rash_core/Cargo.toml)" >> $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 x86_64 \
| grep linux-gnu \
| cut -d '"' -f 4 \
| xargs curl -L \
| tar xvz -C /usr/local/bin
.ci/generate-pkgbuild.rh
- name: Publish AUR package
uses: KSXGitHub/[email protected]
with:
pkgname: ${{ env.PROJECT_NAME }}
pkgbuild: ./PKGBUILD
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
commit_message: Update AUR package to version ${{ env.PROJECT_VERSION }}
ssh_keyscan_types: rsa,ed25519