simplify release workflow, switch AUR to versioned gpupaper package
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -16,8 +16,6 @@ jobs:
|
|||||||
include:
|
include:
|
||||||
- arch: x86_64
|
- arch: x86_64
|
||||||
target: x86_64-unknown-linux-gnu
|
target: x86_64-unknown-linux-gnu
|
||||||
- arch: aarch64
|
|
||||||
target: aarch64-unknown-linux-gnu
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@@ -27,12 +25,6 @@ jobs:
|
|||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y libwayland-dev pkg-config
|
sudo apt-get install -y libwayland-dev pkg-config
|
||||||
|
|
||||||
- name: Install cross-compilation tools (aarch64 only)
|
|
||||||
if: matrix.arch == 'aarch64'
|
|
||||||
run: |
|
|
||||||
sudo apt-get install -y gcc-aarch64-linux-gnu
|
|
||||||
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Install Rust stable
|
- name: Install Rust stable
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
@@ -49,9 +41,9 @@ jobs:
|
|||||||
|
|
||||||
- name: Package
|
- name: Package
|
||||||
run: |
|
run: |
|
||||||
VERSION="${{ gitea.ref_name }}"
|
TAG=${{ gitea.ref_name }}
|
||||||
TARBALL="gpupaper-${VERSION}-${{ matrix.arch }}.tar.gz"
|
TARBALL="gpupaper-${TAG}-${{ matrix.arch }}.tar.gz"
|
||||||
mkdir -p pkg
|
mkdir pkg
|
||||||
cp target/${{ matrix.target }}/release/gpupaper pkg/
|
cp target/${{ matrix.target }}/release/gpupaper pkg/
|
||||||
cp -r shaders pkg/
|
cp -r shaders pkg/
|
||||||
cp LICENSE pkg/
|
cp LICENSE pkg/
|
||||||
@@ -59,41 +51,26 @@ jobs:
|
|||||||
sha256sum "${TARBALL}" > "${TARBALL}.sha256"
|
sha256sum "${TARBALL}" > "${TARBALL}.sha256"
|
||||||
echo "TARBALL=${TARBALL}" >> $GITHUB_ENV
|
echo "TARBALL=${TARBALL}" >> $GITHUB_ENV
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
- name: Create release
|
||||||
# Upload to a PUBLIC Gitea repo used as a release mirror.
|
|
||||||
# Set RELEASE_REPO in repository secrets to "user/public-releases-repo".
|
|
||||||
# The token needs write access to that repo.
|
|
||||||
# ---------------------------------------------------------------------------
|
|
||||||
- name: Create release in mirror repo (if not already exists)
|
|
||||||
if: matrix.arch == 'x86_64'
|
|
||||||
run: |
|
run: |
|
||||||
curl -sX POST \
|
curl -sX POST \
|
||||||
-H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \
|
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
"${{ gitea.server_url }}/api/v1/repos/${{ secrets.RELEASE_REPO }}/releases" \
|
"${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/releases" \
|
||||||
-d "{\"tag_name\":\"${{ gitea.ref_name }}\",\"name\":\"${{ gitea.ref_name }}\",\"body\":\"\"}" \
|
-d "{\"tag_name\":\"${{ gitea.ref_name }}\",\"name\":\"${{ gitea.ref_name }}\"}" \
|
||||||
--fail-with-body || true # ignore if release already exists
|
--fail-with-body || true
|
||||||
|
|
||||||
- name: Get release ID from mirror repo
|
- name: Upload assets
|
||||||
run: |
|
run: |
|
||||||
RELEASE_ID=$(curl -sX GET \
|
RELEASE_ID=$(curl -s \
|
||||||
-H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \
|
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
||||||
"${{ gitea.server_url }}/api/v1/repos/${{ secrets.RELEASE_REPO }}/releases/tags/${{ gitea.ref_name }}" \
|
"${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/releases/tags/${{ gitea.ref_name }}" \
|
||||||
| jq -r '.id')
|
| jq -r '.id')
|
||||||
echo "RELEASE_ID=${RELEASE_ID}" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Upload binary asset
|
for FILE in "${{ env.TARBALL }}" "${{ env.TARBALL }}.sha256"; do
|
||||||
run: |
|
curl -sX POST \
|
||||||
curl -sX POST \
|
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
||||||
-H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \
|
-H "Content-Type: application/octet-stream" \
|
||||||
-H "Content-Type: application/octet-stream" \
|
"${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/releases/${RELEASE_ID}/assets?name=${FILE}" \
|
||||||
"${{ gitea.server_url }}/api/v1/repos/${{ secrets.RELEASE_REPO }}/releases/${{ env.RELEASE_ID }}/assets?name=${{ env.TARBALL }}" \
|
--data-binary "@${FILE}" --fail-with-body
|
||||||
--data-binary "@${{ env.TARBALL }}" --fail-with-body
|
done
|
||||||
|
|
||||||
- name: Upload checksum
|
|
||||||
run: |
|
|
||||||
curl -sX POST \
|
|
||||||
-H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \
|
|
||||||
-H "Content-Type: text/plain" \
|
|
||||||
"${{ gitea.server_url }}/api/v1/repos/${{ secrets.RELEASE_REPO }}/releases/${{ env.RELEASE_ID }}/assets?name=${{ env.TARBALL }}.sha256" \
|
|
||||||
--data-binary "@${{ env.TARBALL }}.sha256" --fail-with-body
|
|
||||||
|
|||||||
+5
-8
@@ -1,10 +1,9 @@
|
|||||||
pkgbase = gpupaper-bin
|
pkgbase = gpupaper
|
||||||
pkgdesc = Wayland layer-surface wallpaper runner powered by GLSL/WGSL fragment shaders (wgpu)
|
pkgdesc = Wayland layer-surface wallpaper runner powered by GLSL/WGSL fragment shaders (wgpu)
|
||||||
pkgver = 0.1.0
|
pkgver = 0.1.0
|
||||||
pkgrel = 1
|
pkgrel = 1
|
||||||
url = https://prosjekt.klingenbergbygg.no/bl/gpupaper
|
url = https://prosjekt.klingenbergbygg.no/bl/gpupaper
|
||||||
arch = x86_64
|
arch = x86_64
|
||||||
arch = aarch64
|
|
||||||
license = MIT
|
license = MIT
|
||||||
depends = wayland
|
depends = wayland
|
||||||
depends = libglvnd
|
depends = libglvnd
|
||||||
@@ -12,11 +11,9 @@ pkgbase = gpupaper-bin
|
|||||||
optdepends = mesa: open-source Vulkan/OpenGL for AMD, Intel, and Raspberry Pi
|
optdepends = mesa: open-source Vulkan/OpenGL for AMD, Intel, and Raspberry Pi
|
||||||
optdepends = nvidia-utils: NVIDIA Vulkan/OpenGL support
|
optdepends = nvidia-utils: NVIDIA Vulkan/OpenGL support
|
||||||
provides = gpupaper
|
provides = gpupaper
|
||||||
conflicts = gpupaper
|
|
||||||
conflicts = gpupaper-git
|
conflicts = gpupaper-git
|
||||||
source_x86_64 = gpupaper-v0.1.0-x86_64.tar.gz::https://prosjekt.klingenbergbygg.no/bl/gpupaper-releases/releases/download/v0.1.0/gpupaper-v0.1.0-x86_64.tar.gz
|
conflicts = gpupaper-bin
|
||||||
sha256sums_x86_64 = SKIP
|
source = gpupaper-v0.1.0-x86_64.tar.gz::https://prosjekt.klingenbergbygg.no/bl/gpupaper/releases/download/v0.1.0/gpupaper-v0.1.0-x86_64.tar.gz
|
||||||
source_aarch64 = gpupaper-v0.1.0-aarch64.tar.gz::https://prosjekt.klingenbergbygg.no/bl/gpupaper-releases/releases/download/v0.1.0/gpupaper-v0.1.0-aarch64.tar.gz
|
sha256sums = SKIP
|
||||||
sha256sums_aarch64 = SKIP
|
|
||||||
|
|
||||||
pkgname = gpupaper-bin
|
pkgname = gpupaper
|
||||||
|
|||||||
+5
-10
@@ -1,9 +1,9 @@
|
|||||||
# Maintainer: Bendik Aagaard Lynghaug <bendik.lynghaug@gmail.com>
|
# Maintainer: Bendik Aagaard Lynghaug <bendik.lynghaug@gmail.com>
|
||||||
pkgname=gpupaper-bin
|
pkgname=gpupaper
|
||||||
pkgver=0.1.0
|
pkgver=0.1.0
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Wayland layer-surface wallpaper runner powered by GLSL/WGSL fragment shaders (wgpu)"
|
pkgdesc="Wayland layer-surface wallpaper runner powered by GLSL/WGSL fragment shaders (wgpu)"
|
||||||
arch=('x86_64' 'aarch64')
|
arch=('x86_64')
|
||||||
url="https://prosjekt.klingenbergbygg.no/bl/gpupaper"
|
url="https://prosjekt.klingenbergbygg.no/bl/gpupaper"
|
||||||
license=('MIT')
|
license=('MIT')
|
||||||
depends=('wayland' 'libglvnd')
|
depends=('wayland' 'libglvnd')
|
||||||
@@ -13,14 +13,9 @@ optdepends=(
|
|||||||
'nvidia-utils: NVIDIA Vulkan/OpenGL support'
|
'nvidia-utils: NVIDIA Vulkan/OpenGL support'
|
||||||
)
|
)
|
||||||
provides=('gpupaper')
|
provides=('gpupaper')
|
||||||
conflicts=('gpupaper' 'gpupaper-git')
|
conflicts=('gpupaper-git' 'gpupaper-bin')
|
||||||
|
source=("gpupaper-v${pkgver}-x86_64.tar.gz::https://prosjekt.klingenbergbygg.no/bl/gpupaper/releases/download/v${pkgver}/gpupaper-v${pkgver}-x86_64.tar.gz")
|
||||||
# Update these URLs and checksums with each release.
|
sha256sums=('SKIP')
|
||||||
# Binaries are hosted at: https://prosjekt.klingenbergbygg.no/bl/gpupaper-releases
|
|
||||||
source_x86_64=("gpupaper-v${pkgver}-x86_64.tar.gz::https://prosjekt.klingenbergbygg.no/bl/gpupaper-releases/releases/download/v${pkgver}/gpupaper-v${pkgver}-x86_64.tar.gz")
|
|
||||||
source_aarch64=("gpupaper-v${pkgver}-aarch64.tar.gz::https://prosjekt.klingenbergbygg.no/bl/gpupaper-releases/releases/download/v${pkgver}/gpupaper-v${pkgver}-aarch64.tar.gz")
|
|
||||||
sha256sums_x86_64=('SKIP')
|
|
||||||
sha256sums_aarch64=('SKIP')
|
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
install -Dm755 gpupaper "$pkgdir/usr/bin/gpupaper"
|
install -Dm755 gpupaper "$pkgdir/usr/bin/gpupaper"
|
||||||
|
|||||||
Reference in New Issue
Block a user