Skip to content

Merge pull request #4 from meowrch/dependabot/github_actions/actions/… #88

Merge pull request #4 from meowrch/dependabot/github_actions/actions/…

Merge pull request #4 from meowrch/dependabot/github_actions/actions/… #88

Workflow file for this run

name: AUR Packages Deployment
on:
push:
branches: [main]
release:
types: [published]
jobs:
deploy-git:
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Deploy Git version
uses: KSXGitHub/github-actions-deploy-aur@master
with:
pkgname: mewline-git
pkgbuild: ./PKGBUILD
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_KEY }}
commit_message: "Git version update"
allow_empty_commits: "true"
deploy-stable:
if: github.event_name == 'release'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Get release version
id: get_version
run: echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: Calculate SHA256
id: sha256
run: |
URL="https://github.com/meowrch/mewline/archive/refs/tags/v${{ steps.get_version.outputs.version }}.tar.gz"
HASH=$(curl -sL "$URL" | sha256sum | cut -d' ' -f1)
echo "hash=$HASH" >> $GITHUB_OUTPUT
- name: Update Stable PKGBUILD
run: |
sed -i \
-e "s/^pkgver=.*/pkgver=${{ steps.get_version.outputs.version }}/" \
-e "s|^source=.*|source=(\"\$url/archive/refs/tags/v\$pkgver.tar.gz\")|" \
-e "s/mewline-v\$pkgver/mewline-\$pkgver/" \
-e "s/^sha256sums=.*/sha256sums=('${{ steps.sha256.outputs.hash }}')/" \
PKGBUILD.stable
- name: Deploy Stable version
uses: KSXGitHub/github-actions-deploy-aur@master
with:
pkgname: mewline
pkgbuild: ./PKGBUILD.stable
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_KEY }}
commit_message: "Stable release v${{ steps.get_version.outputs.version }}"