Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c719916612 | ||
|
|
b65af50996 |
No files matched your search
@@ -40,6 +40,45 @@ jobs:
|
||||
VER="${GITHUB_REF_NAME#v}"
|
||||
dart tool/release_publish.dart "$GITHUB_REF_NAME" "dist/watch-together-$VER-linux-x64.tar.gz"
|
||||
|
||||
arch:
|
||||
runs-on: ubuntu-latest
|
||||
container: archlinux:latest
|
||||
steps:
|
||||
- name: Install Arch build deps
|
||||
run: |
|
||||
pacman -Syu --noconfirm --needed base-devel clang cmake flutter git \
|
||||
gtk3 libepoxy mpv ninja pkgconf
|
||||
|
||||
- name: Checkout
|
||||
run: |
|
||||
git init -q .
|
||||
git remote add origin "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git"
|
||||
git fetch -q --tags origin "$GITHUB_SHA"
|
||||
git checkout -q --force FETCH_HEAD
|
||||
|
||||
- name: Build Arch package
|
||||
run: |
|
||||
useradd --create-home builder
|
||||
chown -R builder .
|
||||
runuser -u builder -- sh -c \
|
||||
'cd deploy/arch && makepkg --cleanbuild --noconfirm --nodeps'
|
||||
|
||||
- name: Publish Arch package
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||
run: |
|
||||
TOKEN="${RELEASE_TOKEN:-${GITHUB_TOKEN:-$GITEA_TOKEN}}"
|
||||
test -n "$TOKEN"
|
||||
set -- deploy/arch/*.pkg.tar.zst
|
||||
test -f "$1"
|
||||
curl --fail --show-error --request PUT \
|
||||
--header "Authorization: token $TOKEN" \
|
||||
--upload-file "$1" \
|
||||
"$GITHUB_API_URL/packages/$GITHUB_REPOSITORY_OWNER/arch/core/x86_64"
|
||||
|
||||
windows:
|
||||
# yuuka-windows: host-mode runner (no containers), runs as SYSTEM, has
|
||||
# git + VS 2022 Build Tools but no bash/python — PowerShell and Dart
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
pkgname=engawa-sync-git
|
||||
pkgver=1.0.0
|
||||
pkgrel=1
|
||||
pkgdesc='Synchronised mpv watch-together desktop client and dedicated server'
|
||||
arch=('x86_64')
|
||||
url='https://git.senkochan.moe/Foxyz/sync_replay_project'
|
||||
license=('unknown')
|
||||
depends=('gtk3' 'libepoxy' 'libmpv')
|
||||
makedepends=('clang' 'cmake' 'flutter' 'ninja' 'pkgconf')
|
||||
source=("${pkgname}::git+${url}.git#tag=v${pkgver}")
|
||||
b2sums=('SKIP')
|
||||
|
||||
prepare() {
|
||||
cd "$srcdir/$pkgname/apps/desktop"
|
||||
flutter pub get
|
||||
|
||||
cd "$srcdir/$pkgname/packages/server"
|
||||
dart pub get
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$srcdir/$pkgname/apps/desktop"
|
||||
flutter build linux --release --dart-define=APP_VERSION="$pkgver"
|
||||
|
||||
cd "$srcdir/$pkgname/packages/server"
|
||||
dart compile exe bin/server.dart -o watch-together-server
|
||||
}
|
||||
|
||||
package() {
|
||||
local bundle="$srcdir/$pkgname/apps/desktop/build/linux/x64/release/bundle"
|
||||
|
||||
install -d "$pkgdir/usr/lib/$pkgname" "$pkgdir/usr/bin"
|
||||
cp -a "$bundle/." "$pkgdir/usr/lib/$pkgname/"
|
||||
install -Dm755 "$srcdir/$pkgname/packages/server/watch-together-server" \
|
||||
"$pkgdir/usr/lib/$pkgname/watch-together-server"
|
||||
|
||||
ln -s "/usr/lib/$pkgname/watch_together" "$pkgdir/usr/bin/$pkgname"
|
||||
ln -s "/usr/lib/$pkgname/watch-together-server" \
|
||||
"$pkgdir/usr/bin/$pkgname-server"
|
||||
}
|
||||
Reference in new issue
Block a user