Skip to content

Commit

Permalink
consolidate nightly and release aur PKGBUILD file
Browse files Browse the repository at this point in the history
  • Loading branch information
gnunicorn committed Aug 29, 2024
1 parent c7dae60 commit aa6da82
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 54 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/deploy-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,49 @@ jobs:
commit_message: Updated to ${{ needs.tags.outputs.tag }}


publish_aur_nightly:
environment: release
needs:
- tags
- build
name: Publish AUR nightly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: Linux x64
- name: Patch PKGBUILD file
run: |
cp app/linux/packaging/aur/PKGBUILD PKGBUILD
VERSION=${{ needs.tags.outputs.version }}
DOWNLOAD_PATH='nightly-${{ needs.tags.outputs.tag }}%/acter-nightly-linux-x64-$VERSION.tar.bz2'
MD5SUM=md5sum acter-nightly-linux-x64-$VERSION.tar.bz2 | awk '{print $1}'
echo "Version: $VERSION"
echo "Download Path: $DOWNLOAD_PATH"
echo "MD5Sum: $MD5SUM"
sed -i "s/%{{PKGNAME}}%/acter-nightly-bin/g" PKGBUILD
sed -i "s/%{{PKGNAME_CONFLICTS}}%/acter-bin/g" PKGBUILD
sed -i "s/%{{VERSION}}%/$VERSION/g" PKGBUILD
sed -i "s/%{{DOWNLOAD_PATH}}%/$DOWNLOAD_PATH/g" PKGBUILD
sed -i "s/%{{LINUX_MD5}}%/$MD5SUM/g" PKGBUILD
echo " --- Final PKGBUILD File "
cat PKGBUILD
- uses: KSXGitHub/[email protected]
name: Publish to AUR
with:
pkgname: acter-nightly-bin
pkgbuild: ./PKGBUILD
commit_username: Sari
commit_email: [email protected]
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
commit_message: Updated to ${{ needs.tags.outputs.tag }}

###### #### ######## ## ## ## ## ######## ######## ## ## ######## ## #### ###### ## ##
## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
Expand Down
45 changes: 36 additions & 9 deletions .github/workflows/deploy-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -328,11 +328,24 @@ jobs:
- name: Create PKGBUILD file
run: |
cp app/linux/packaging/aur/PKGBUILD PKGBUILD
sed -i "s/%{{TAG}}%/${{ needs.tags.outputs.version }}/g" PKGBUILD
VERSION=$(echo ${{ needs.tags.outputs.version }} | sed "s/-/./g")
VERSION=${{ needs.tags.outputs.version }}
DOWNLOAD_PATH='v$VERSION/acter-linux-x64-$VERSION.tar.bz2'
MD5SUM=md5sum acter-linux-x64-${{ needs.tags.outputs.version }}.tar.bz2 | awk '{print $1}'
echo "Version: $VERSION"
echo "Download Path: $DOWNLOAD_PATH"
echo "MD5Sum: $MD5SUM"
sed -i "s/%{{PKGNAME}}%/acter-bin/g" PKGBUILD
sed -i "s/%{{PKGNAME_CONFLICTS}}%/acter-nightly-bin/g" PKGBUILD
sed -i "s/%{{VERSION}}%/$VERSION/g" PKGBUILD
sed -i "s/%{{PKGREL}}%/2/g" PKGBUILD
sed -i "s/%{{LINUX_MD5}}%/`md5sum acter-linux-x64-${{ needs.tags.outputs.version }}.tar.bz2 | awk '{print $1}'`/g" PKGBUILD
sed -i "s/%{{DOWNLOAD_PATH}}%/$DOWNLOAD_PATH/g" PKGBUILD
sed -i "s/%{{LINUX_MD5}}%/$MD5SUM/g" PKGBUILD
echo " --- Final PKGBUILD File "
cat PKGBUILD
- uses: KSXGitHub/[email protected]
name: Publish to AUR
with:
Expand All @@ -357,11 +370,25 @@ jobs:
name: Linux x64
- name: Patch PKGBUILD file
run: |
cp app/linux/packaging/aur/PKGBUILD-nightly PKGBUILD
sed -i "s/%{{TAG}}%/${{ needs.tags.outputs.tag }}/g" PKGBUILD
sed -i "s/%{{VERSION}}%/${{ needs.tags.outputs.version }}/g" PKGBUILD
sed -i "s/%{{PKGREL}}%/1/g" PKGBUILD
sed -i "s/%{{LINUX_MD5}}%/`md5sum acter-linux-x64-${{ needs.tags.outputs.version }}.tar.bz2 | awk '{print $1}'`/g" PKGBUILD
cp app/linux/packaging/aur/PKGBUILD PKGBUILD
VERSION=${{ needs.tags.outputs.version }}
DOWNLOAD_PATH='v$VERSION/acter-linux-x64-$VERSION.tar.bz2'
MD5SUM=md5sum acter-linux-x64-$VERSION.tar.bz2 | awk '{print $1}'
echo "Version: $VERSION"
echo "Download Path: $DOWNLOAD_PATH"
echo "MD5Sum: $MD5SUM"
sed -i "s/%{{PKGNAME}}%/acter-nightly-bin/g" PKGBUILD
sed -i "s/%{{PKGNAME_CONFLICTS}}%/acter-bin/g" PKGBUILD
sed -i "s/%{{VERSION}}%/$VERSION/g" PKGBUILD
sed -i "s/%{{DOWNLOAD_PATH}}%/$DOWNLOAD_PATH/g" PKGBUILD
sed -i "s/%{{LINUX_MD5}}%/$MD5SUM/g" PKGBUILD
echo " --- Final PKGBUILD File "
cat PKGBUILD
- uses: KSXGitHub/[email protected]
name: Publish to AUR
with:
Expand Down
6 changes: 3 additions & 3 deletions app/linux/packaging/aur/PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Maintainer: Benjamin Kampmann <[email protected]>
pkgname=acter-bin
pkgname=%{{PKGNAME}}%
pkgver=%{{VERSION}}%
pkgrel=%{{PKGREL}}%
pkgrel=1
epoch=
pkgdesc="Casual Community Organizing"
arch=(x86_64)
Expand All @@ -13,7 +13,7 @@ makedepends=()
checkdepends=()
optdepends=()
provides=()
conflicts=('acter-nightly-bin')
conflicts=('%{{PKGNAME_CONFLICTS}}%')
replaces=()
backup=()
options=()
Expand Down
42 changes: 0 additions & 42 deletions app/linux/packaging/aur/PKGBUILD-nightly

This file was deleted.

0 comments on commit aa6da82

Please sign in to comment.