3 Commits
Author SHA1 Message Date
Uyanide dd09e85b9e 🐛 fix: update version in CMakeLists.txt
Release / Build and Release (push) Successful in 43s
2026-08-22 03:00:46 +02:00
Uyanide 7ea701de5c 🚀 CD: add release.yml
Release / Build and Release (push) Failing after 26s
2026-08-22 02:55:49 +02:00
Uyanide 64b62246d7 🚀 CD: remove workflow 2026-08-21 18:04:41 +02:00
2 changed files with 58 additions and 144 deletions
+57 -143
View File
@@ -3,160 +3,74 @@ name: Release
on: on:
push: push:
tags: tags:
- 'v*' - 'v*.*.*'
jobs: jobs:
build-arch: release:
name: Build ArchLinux Package name: Build and Release
runs-on: ubuntu-latest runs-on: ubuntu-24.04
steps: steps:
- name: Checkout Code - name: Checkout Code
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Extract Version - name: Verify Tag Matches Project Version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
- name: Generate PKGBUILD
run: | run: |
TAR_URL="https://git.uyani.de/Uyanide/WallReel/archive/v${{ env.VERSION }}.tar.gz" TAG_VERSION="${GITHUB_REF_NAME#v}"
CMAKE_VERSION=$(sed -n 's/^project(WallReel VERSION \([0-9.]\+\).*/\1/p' CMakeLists.txt)
if [ "$TAG_VERSION" != "$CMAKE_VERSION" ]; then
echo "::error::Tag v${TAG_VERSION} does not match project(WallReel VERSION ${CMAKE_VERSION})"
exit 1
fi
echo "VERSION=${TAG_VERSION}" >> "$GITHUB_ENV"
wget -qO source.tar.gz "$TAR_URL" - name: Install Build Dependencies
SHA256=$(sha256sum source.tar.gz | awk '{print $1}') run: |
apt-get update
apt-get install -y --no-install-recommends \
cmake g++ jq qt6-base-dev qt6-declarative-dev
cat << 'EOF' > PKGBUILD - name: Configure
# Maintainer: Uyanide <me@uyani.de> run: |
pkgname=wallreel cmake -S . -B build \
pkgver=${{ env.VERSION }} -DCMAKE_BUILD_TYPE=Release \
pkgrel=1 -DCMAKE_INSTALL_PREFIX=/usr \
pkgdesc="Choose and set desktop wallpapers with customizable themes and actions" -Wno-dev
arch=('x86_64')
url="https://git.uyani.de/Uyanide/WallReel"
license=('MIT')
depends=('qt6-base' 'qt6-declarative' 'gcc-libs' 'glibc')
makedepends=('cmake')
options=('!debug')
source=("${pkgname}-${pkgver}.tar.gz::https://git.uyani.de/Uyanide/WallReel/archive/v${pkgver}.tar.gz")
sha256sums=('INSERT_SHA256_HERE')
build() { - name: Build
cd "wallreel" run: cmake --build build --parallel "$(nproc)"
cmake -B build -S . \
-DCMAKE_BUILD_TYPE='Release' \ - name: Publish Release
-DCMAKE_INSTALL_PREFIX='/usr' \ env:
-Wno-dev TOKEN: ${{ secrets.GITHUB_TOKEN }}
cmake --build build run: |
set -euo pipefail
API="${GITHUB_SERVER_URL}/api/v1/repos/${GITHUB_REPOSITORY}"
AUTH="Authorization: token ${TOKEN}"
NOTES=$(git tag -l --format='%(contents)' "$GITHUB_REF_NAME")
payload() {
jq -n --arg tag "$GITHUB_REF_NAME" \
--arg name "WallReel ${VERSION}" \
--arg body "$NOTES" \
"$1"
} }
package() { code=$(curl -sS -o /tmp/resp.json -w '%{http_code}' -X POST "$API/releases" \
cd "wallreel" -H "$AUTH" -H 'Content-Type: application/json' \
DESTDIR="$pkgdir" cmake --install build --data-binary "$(payload '{tag_name:$tag, name:$name, body:$body, draft:false, prerelease:false}')")
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
EOF
sed -i "s/INSERT_SHA256_HERE/$SHA256/" PKGBUILD if [ "$code" = "409" ]; then
echo "Release for ${GITHUB_REF_NAME} already exists, updating in place."
id=$(curl -sS -H "$AUTH" "$API/releases/tags/${GITHUB_REF_NAME}" | jq -r '.id')
code=$(curl -sS -o /tmp/resp.json -w '%{http_code}' -X PATCH "$API/releases/${id}" \
-H "$AUTH" -H 'Content-Type: application/json' \
--data-binary "$(payload '{name:$name, body:$body, draft:false, prerelease:false}')")
fi
- name: Build and Generate AUR Meta case "$code" in
run: | 2*) echo "Release published (HTTP ${code})." ;;
tar -cf - . | docker run --rm -i archlinux:latest /bin/bash -e -c " *) echo "::error::Gitea API returned HTTP ${code}"; cat /tmp/resp.json; exit 1 ;;
mkdir -p /workspace && cd /workspace esac
tar -xf -
exec 3>&1 1>&2
pacman-key --init && pacman-key --populate
pacman -Sy --noconfirm archlinux-keyring
pacman -Su --noconfirm base-devel cmake qt6-base qt6-declarative sudo
echo 'MAKEFLAGS="-j$(nproc)"' >> /etc/makepkg.conf
useradd -m builduser
chown -R builduser:builduser /workspace
echo 'builduser ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
su - builduser -c 'cd /workspace && makepkg -sf --noconfirm'
su - builduser -c 'cd /workspace && makepkg --printsrcinfo' > SRCINFO.txt
tar -cf - *.pkg.tar.zst PKGBUILD SRCINFO.txt >&3
" | tar -xf -
- name: Upload Arch Artifacts
uses: actions/upload-artifact@v3
with:
name: arch-artifacts
path: |
*.pkg.tar.zst
PKGBUILD
SRCINFO.txt
publish-gitea:
name: Publish to Gitea Release
needs: [build-arch]
runs-on: ubuntu-latest
steps:
- name: Extract Version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
- name: Download Arch Artifacts
uses: actions/download-artifact@v3
with:
name: arch-artifacts
path: .
- name: Publish to Gitea Release
uses: softprops/action-gh-release@v1
with:
name: WallReel ${{ env.VERSION }}
draft: false
prerelease: false
files: "*.pkg.tar.zst"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish-aur:
name: Publish to AUR
needs: [build-arch]
runs-on: ubuntu-latest
steps:
- name: Extract Version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
- name: Download Arch Artifacts
uses: actions/download-artifact@v3
with:
name: arch-artifacts
path: .
- name: Publish to AUR
env:
AUR_KEY: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
run: |
mkdir -p ~/.ssh
echo "$AUR_KEY" > ~/.ssh/aur
chmod 600 ~/.ssh/aur
ssh-keyscan aur.archlinux.org >> ~/.ssh/known_hosts
cat <<EOF > ~/.ssh/config
Host aur.archlinux.org
IdentityFile ~/.ssh/aur
User aur
EOF
git config --global user.name "Uyanide"
git config --global user.email "me@uyani.de"
git clone ssh://aur@aur.archlinux.org/wallreel.git aur-repo
cp PKGBUILD aur-repo/
cp SRCINFO.txt aur-repo/.SRCINFO
cd aur-repo
cat << 'EOF' > LICENSE
Copyright (C) 2026 by Uyanide me@uyani.de
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
EOF
git add PKGBUILD LICENSE .SRCINFO
git commit -m "Release v${{ env.VERSION }}"
git push origin master
+1 -1
View File
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.16) cmake_minimum_required(VERSION 3.16)
project(WallReel VERSION 2.2.0 LANGUAGES CXX) project(WallReel VERSION 2.2.2 LANGUAGES CXX)
set(EXECUTABLE_NAME "wallreel") set(EXECUTABLE_NAME "wallreel")
set(CORELIB_NAME "wallreel-core") set(CORELIB_NAME "wallreel-core")