Skip to content

Commit

Permalink
feat(repo)!: use github release instead of gh-pages (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher authored Jul 10, 2024
1 parent f17e3ab commit db0962a
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 32 deletions.
39 changes: 19 additions & 20 deletions .github/workflows/build-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,17 @@ jobs:
runs-on: ubuntu-latest
container:
image: archlinux:base-devel
env:
DISPLAY: ":1"
steps:
- name: Container Setup
run: |
pacman -Syu --disable-download-timeout --needed --noconfirm \
archlinux-keyring \
git \
reflector \
wget
wget \
xorg-server-xvfb
- name: Update mirrors
run: |
Expand All @@ -44,30 +47,26 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Checkout
uses: actions/checkout@v4
with:
ref: gh-pages
path: gh-pages
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, will fail to push refs to dest repo
- name: Init
run: |
mkdir -p repo
Xvfb ${DISPLAY} -screen 0 1024x768x24 &
- name: Build Pacman Repo
run: |
build-pacman-repo patch-makepkg --replace
build-pacman-repo build
- name: Additional updates
run: |
cp -f README.md ./gh-pages/README.md
- name: GitHub Commit & Push
- name: Create/Update GitHub Release
if: github.event_name == 'schedule' || github.event_name == 'push'
uses: actions-js/push@v1.5
uses: ncipollo/release-action@v1.14.0
with:
author_email: ${{ secrets.GH_BOT_EMAIL }}
author_name: ${{ secrets.GH_BOT_NAME }}
branch: gh-pages
directory: gh-pages
github_token: ${{ secrets.GH_BOT_TOKEN }}
message: 'Update per ${{ github.event_name }}: ${{ github.sha }}'
allowUpdates: true
artifactErrorsFailBuild: true
artifacts: repo/*
bodyFile: README.md
commit: master
name: repo
prerelease: false
tag: repo
token: ${{ secrets.GH_BOT_TOKEN }}
28 changes: 20 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,36 @@ Repository of Arch Linux packages for LizardByte packages.
> become the packager of an AUR repo. If you use the AUR, please carefully inspect any PKGBUILDS for packages that you
> are using, before any installation. This repository is the only official source of LizardByte packages.
## Installation
## Repo Installation

Add the following code snippet to your `/etc/pacman.conf`:

```conf
[lizardbyte]
SigLevel = Optional
Server = https://app.lizardbyte.dev/pacman-repo
Server = https://github.com/LizardByte/pacman-repo/releases/latest/download
```

or:
```conf
[lizardbyte]
SigLevel = Optional
Server = https://raw.github.com/LizardByte/pacman-repo/gh-pages
Then, run `sudo pacman -Sy` to update repository.

## Packages

### List repo packages

```bash
pacman -Sl lizardbyte
```

Then, run `sudo pacman -Sy` to update repository.
### Install repo packages

```bash
sudo pacman -S lizardbyte/<package-name>
```

e.g.
```bash
sudo pacman -S lizardbyte/sunshine
```

## Considerations

Expand Down
2 changes: 1 addition & 1 deletion build-pacman-repo.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
global-settings:
repository: gh-pages/lizardbyte.db.tar.gz
repository: repo/lizardbyte.db.tar.gz
container: pkgbuilds
read-build-metadata: either
record-failed-builds: failed-builds.yaml
Expand Down
2 changes: 2 additions & 0 deletions pkgbuilds/sunshine/.SRCINFO
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ pkgbase = sunshine
license = GPL-3.0-only
makedepends = boost
makedepends = cmake
makedepends = cuda
makedepends = gcc13
makedepends = git
makedepends = make
makedepends = nodejs
Expand Down
14 changes: 11 additions & 3 deletions pkgbuilds/sunshine/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

pkgname=sunshine
pkgver=0.23.1
pkgrel=1
pkgrel=2
pkgdesc="A self-hosted GameStream host for Moonlight."
arch=('x86_64' 'aarch64')
url=https://app.lizardbyte.dev/Sunshine
Expand Down Expand Up @@ -33,7 +33,6 @@ depends=('avahi'
'numactl'
'openssl'
'opus'
'python'
'udev')
makedepends=('boost'
'cmake'
Expand Down Expand Up @@ -79,11 +78,20 @@ build() {
-D BUILD_WERROR=ON \
-D CMAKE_INSTALL_PREFIX=/usr \
-D SUNSHINE_EXECUTABLE_PATH=/usr/bin/sunshine \
-D SUNSHINE_ASSETS_DIR="share/sunshine"
-D SUNSHINE_ASSETS_DIR="share/sunshine" \
-D TESTS_ENABLE_PYTHON_TESTS=OFF

make -C build
}

check() {
export CC="gcc-${_gcc_version}"
export CXX="g++-${_gcc_version}"

cd "${srcdir}/build/tests"
./test_sunshine --gtest_color=yes
}

package() {
make -C build install DESTDIR="$pkgdir"
}

0 comments on commit db0962a

Please sign in to comment.