Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/aur.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ jobs:
publish:
name: AUR Publish
runs-on: ubuntu-latest
strategy:
matrix:
package: [rustmius, rustmius-bin, rustmius-git]

steps:
- name: Checkout code
Expand All @@ -18,10 +21,10 @@ jobs:
- name: Publish AUR package
uses: KSXGitHub/github-actions-deploy-aur@v4.1.3
with:
pkgname: rustmius-bin
pkgbuild: ./PKGBUILD
pkgname: ${{ matrix.package }}
pkgbuild: ./packages/${{ matrix.package }}/PKGBUILD
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
commit_message: Update AUR package
commit_message: Update ${{ matrix.package }}
ssh_keyscan_types: rsa,ecdsa,ed25519
45 changes: 35 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,59 +168,84 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

aur:
name: Update AUR
name: Update AUR (${{ matrix.package }})
needs: [prepare, build]
runs-on: ubuntu-latest
permissions:
contents: write
strategy:
matrix:
package: [rustmius, rustmius-bin, rustmius-git]
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Download Artifacts
if: matrix.package == 'rustmius-bin'
uses: actions/download-artifact@v8
with:
name: binary-x86_64
path: .

- name: Update PKGBUILD
- name: Update PKGBUILD (rustmius-bin)
if: matrix.package == 'rustmius-bin'
run: |
VERSION="${{ needs.prepare.outputs.version_only }}"
HASH_DESKTOP=$(sha256sum rustmius.desktop | cut -d' ' -f1)
HASH_PNG=$(sha256sum rustmius.png | cut -d' ' -f1)
# Paths updated to packages/ subdirectory
HASH_DESKTOP=$(sha256sum packages/rustmius.desktop | cut -d' ' -f1)
HASH_PNG=$(sha256sum packages/rustmius.png | cut -d' ' -f1)
HASH_LICENSE=$(sha256sum LICENSE | cut -d' ' -f1)
HASH_BINARY=$(sha256sum rustmius-x86_64 | cut -d' ' -f1)

# Target the specific PKGBUILD in packages/rustmius-bin/
TARGET="packages/rustmius-bin/PKGBUILD"
awk -v v="$VERSION" -v d="$HASH_DESKTOP" -v p="$HASH_PNG" -v l="$HASH_LICENSE" -v b="$HASH_BINARY" '
BEGIN { h[0]=d; h[1]=p; h[2]=l; h[3]=b; i=0 }
/^pkgver=/ { $0="pkgver=" v }
/^pkgrel=/ { $0="pkgrel=1" }
/^pkgdesc=/ { $0="pkgdesc=\"Full local Termius alternative for Linux (GTK4) - binary release\"" }
/'\''[0-9a-f]{64}'\''/ && i < 4 {
sub(/'\''[0-9a-f]{64}'\''/, "'\''" h[i++] "'\''")
}
{ print }
' PKGBUILD > PKGBUILD.tmp && mv PKGBUILD.tmp PKGBUILD
' "$TARGET" > "$TARGET.tmp" && mv "$TARGET.tmp" "$TARGET"

- name: Commit and Push PKGBUILD
- name: Update PKGBUILD (rustmius)
if: matrix.package == 'rustmius'
run: |
VERSION="${{ needs.prepare.outputs.version_only }}"
# Get source archive hash
URL="https://github.com/Cleboost/Rustmius/archive/v$VERSION.tar.gz"
curl -L -o source.tar.gz "$URL"
HASH_SOURCE=$(sha256sum source.tar.gz | cut -d' ' -f1)

TARGET="packages/rustmius/PKGBUILD"
sed -i "s/^pkgver=.*/pkgver=$VERSION/" "$TARGET"
sed -i "s/^pkgrel=.*/pkgrel=1/" "$TARGET"
sed -i "s/^pkgdesc=.*/pkgdesc=\"Full local Termius alternative for Linux (GTK4) - built from stable source\"/" "$TARGET"
# Update the source hash (it's the only hash in this PKGBUILD)
sed -i "s/sha256sums=('.*')/sha256sums=('$HASH_SOURCE')/" "$TARGET"

- name: Commit and Push PKGBUILDs
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"

git add PKGBUILD
git add packages/

if [ -z "$(git status --porcelain)" ]; then
echo "nothing to commit"
else
git commit -m "chore: update PKGBUILD to ${{ needs.prepare.outputs.new_version }}"
git commit -m "chore: update PKGBUILDs to ${{ needs.prepare.outputs.new_version }}"
git pull --rebase origin master
git push origin master
fi

- name: Publish AUR package
uses: KSXGitHub/github-actions-deploy-aur@v4.1.3
with:
pkgname: rustmius-bin
pkgbuild: ./PKGBUILD
pkgname: ${{ matrix.package }}
pkgbuild: ./packages/${{ matrix.package }}/PKGBUILD
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
Expand Down
6 changes: 3 additions & 3 deletions PKGBUILD → packages/rustmius-bin/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ pkgname=rustmius-bin
_pkgname=rustmius
pkgver=2.4.1
pkgrel=1
pkgdesc="Full local Termius alternative for Linux (GTK4)"
pkgdesc="Full local Termius alternative for Linux (GTK4) - binary release"
arch=('x86_64')
url="https://github.com/Cleboost/Rustmius"
license=('MIT')
Expand All @@ -11,8 +11,8 @@ provides=("$_pkgname")
conflicts=("$_pkgname")

source=(
"$_pkgname.desktop::https://raw.githubusercontent.com/Cleboost/Rustmius/refs/heads/master/rustmius.desktop"
"$_pkgname.png::https://raw.githubusercontent.com/Cleboost/Rustmius/refs/heads/master/rustmius.png"
"$_pkgname.desktop::https://raw.githubusercontent.com/Cleboost/Rustmius/refs/heads/master/packages/rustmius.desktop"
"$_pkgname.png::https://raw.githubusercontent.com/Cleboost/Rustmius/refs/heads/master/packages/rustmius.png"
"LICENSE::https://raw.githubusercontent.com/Cleboost/Rustmius/refs/heads/master/LICENSE"
"$_pkgname-$pkgver-x86_64::$url/releases/download/v$pkgver/$_pkgname-x86_64"
)
Expand Down
32 changes: 32 additions & 0 deletions packages/rustmius-git/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
pkgname=rustmius-git
_pkgname=rustmius
pkgver=r147.3691240
pkgrel=1
pkgdesc="Full local Termius alternative for Linux (GTK4) - latest development version (git)"
arch=('x86_64')
url="https://github.com/Cleboost/Rustmius"
license=('MIT')
depends=('gtk4' 'vte4')
makedepends=('cargo' 'git')
provides=("$_pkgname")
conflicts=("$_pkgname")
source=("git+$url.git")
sha256sums=('SKIP')

pkgver() {
cd "$_pkgname"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
cd "$_pkgname"
cargo build --release --locked
}

package() {
cd "$_pkgname"
install -Dm755 "target/release/$_pkgname" "$pkgdir/usr/bin/$_pkgname"
install -Dm644 "packages/rustmius.desktop" "$pkgdir/usr/share/applications/$_pkgname.desktop"
install -Dm644 "packages/rustmius.png" "$pkgdir/usr/share/icons/hicolor/512x512/apps/$_pkgname.png"
install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$_pkgname/LICENSE"
}
File renamed without changes.
File renamed without changes
24 changes: 24 additions & 0 deletions packages/rustmius/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
pkgname=rustmius
pkgver=2.4.1
pkgrel=1
pkgdesc="Full local Termius alternative for Linux (GTK4) - built from stable source"
arch=('x86_64')
url="https://github.com/Cleboost/Rustmius"
license=('MIT')
depends=('gtk4' 'vte4')
makedepends=('cargo')
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha256sums=('767123982e56218d363d508922855f44208a098953181829623e100803328532')

build() {
cd "$pkgname-$pkgver"
cargo build --release --locked
}

package() {
cd "$pkgname-$pkgver"
install -Dm755 "target/release/$pkgname" "$pkgdir/usr/bin/$pkgname"
install -Dm644 "packages/rustmius.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"
install -Dm644 "packages/rustmius.png" "$pkgdir/usr/share/icons/hicolor/512x512/apps/$pkgname.png"
install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}