ci: publish an Arch package to the Gitea registry so pacman users can install while the AUR is closed #19
No files matched your search
@@ -0,0 +1,57 @@
|
|||||||
|
name: Arch package
|
||||||
|
|
||||||
|
# Builds the qtpotato package from a release tag and publishes it to this Gitea's Arch
|
||||||
|
# registry, so users can install it with pacman until it is on the AUR.
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags: ['v*']
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
tag:
|
||||||
|
description: Release tag to package, e.g. v0.1.0
|
||||||
|
required: true
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
package:
|
||||||
|
# Arch Linux only ships x86_64 images, so pick an amd64 runner.
|
||||||
|
runs-on: amd64
|
||||||
|
container: archlinux:latest
|
||||||
|
env:
|
||||||
|
TAG: ${{ inputs.tag || github.ref_name }}
|
||||||
|
steps:
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
pacman -Syu --noconfirm --needed git nodejs base-devel cmake ninja extra-cmake-modules \
|
||||||
|
qt6-base qt6-declarative kirigami ki18n kcoreaddons kcrash kconfig \
|
||||||
|
mpvqt qcoro qtkeychain-qt6 ffmpeg hicolor-icon-theme
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ inputs.tag || github.ref }}
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
version="${TAG#v}"
|
||||||
|
dir=/tmp/pkg
|
||||||
|
mkdir -p "$dir"
|
||||||
|
git config --global --add safe.directory "$PWD"
|
||||||
|
git archive --format=tar --prefix="qtpotato-$version/" HEAD | gzip -n > "$dir/qtpotato-$version.tar.gz"
|
||||||
|
sum="$(sha256sum "$dir/qtpotato-$version.tar.gz" | cut -d' ' -f1)"
|
||||||
|
sed -e "s/^pkgver=.*/pkgver=$version/" -e "s/^pkgrel=.*/pkgrel=1/" \
|
||||||
|
-e 's/^source=.*/source=("$pkgname-$pkgver.tar.gz")/' \
|
||||||
|
-e "s/^sha256sums=.*/sha256sums=('$sum')/" \
|
||||||
|
packaging/aur/qtpotato/PKGBUILD > "$dir/PKGBUILD"
|
||||||
|
# makepkg refuses to run as root.
|
||||||
|
useradd -m builder
|
||||||
|
chown -R builder "$dir"
|
||||||
|
su builder -c "cd $dir && makepkg --noconfirm"
|
||||||
|
- name: Publish
|
||||||
|
env:
|
||||||
|
TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: |
|
||||||
|
for f in /tmp/pkg/qtpotato-[0-9]*.pkg.tar.zst; do
|
||||||
|
curl -fsS -X PUT -H "Authorization: token $TOKEN" --upload-file "$f" \
|
||||||
|
"$GITHUB_SERVER_URL/api/packages/${GITHUB_REPOSITORY%%/*}/arch/qtpotato"
|
||||||
|
done
|
||||||
@@ -24,6 +24,42 @@ translate a whole subtitle track with any OpenAI-compatible API and show the res
|
|||||||
auto-hiding controls.
|
auto-hiding controls.
|
||||||
- Follows your Plasma style, colours and icons.
|
- Follows your Plasma style, colours and icons.
|
||||||
|
|
||||||
|
## Installing on Arch Linux
|
||||||
|
|
||||||
|
### From the pacman repository
|
||||||
|
|
||||||
|
Every release is built and published to this Gitea's package registry. Import the signing key
|
||||||
|
once:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
curl -O https://git.trivk.dev/api/packages/tri/arch/repository.key
|
||||||
|
sudo pacman-key --add repository.key
|
||||||
|
sudo pacman-key --lsign-key 9C48725295A5F54A6A491CF86B273DD49890E8A7
|
||||||
|
```
|
||||||
|
|
||||||
|
Then add the repository to `/etc/pacman.conf` and install:
|
||||||
|
|
||||||
|
```ini
|
||||||
|
[qtpotato]
|
||||||
|
SigLevel = Required
|
||||||
|
Server = https://git.trivk.dev/api/packages/tri/arch/$repo/$arch
|
||||||
|
```
|
||||||
|
|
||||||
|
```sh
|
||||||
|
sudo pacman -Sy qtpotato
|
||||||
|
```
|
||||||
|
|
||||||
|
The package is built against Arch's current Qt and KDE Frameworks. If it breaks after a system
|
||||||
|
update before a new release is out, build it from source as below.
|
||||||
|
|
||||||
|
### From the PKGBUILD
|
||||||
|
|
||||||
|
```sh
|
||||||
|
git clone https://git.trivk.dev/tri/QtPotato.git
|
||||||
|
cd QtPotato/packaging/aur/qtpotato # or qtpotato-git for the latest main
|
||||||
|
makepkg -si
|
||||||
|
```
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
### Dependencies
|
### Dependencies
|
||||||
|
|||||||
Reference in new issue
Block a user