chore(release): update source archive format and URLs
Some checks failed
Release / test (push) Successful in -30m28s
Release / release (push) Successful in -29m36s
Release / pkg-aur (push) Failing after -31m0s
Release / pkg-arch (push) Failing after -30m36s
Release / pkg-deb (push) Successful in -30m6s
Release / pkg-rpm (push) Failing after -30m27s

* Change source archive from tar.gz to zip for Arch packaging
* Update URLs in PKGBUILD and spec files to point to the correct repository
This commit is contained in:
Hein
2026-04-08 15:09:33 +02:00
parent 2c0f51422e
commit e66f869752
3 changed files with 62 additions and 11 deletions

View File

@@ -105,16 +105,16 @@ jobs:
VERSION="${{ github.event.inputs.tag || github.ref_name }}" VERSION="${{ github.event.inputs.tag || github.ref_name }}"
PKGVER="${VERSION#v}" PKGVER="${VERSION#v}"
# Source tarball — prefix=unitdore/ matches `cd "$pkgname"` in PKGBUILD # Source archive — prefix=unitdore-vVERSION/ matches `cd "$pkgname-v$pkgver"` in PKGBUILD
git archive --format=tar.gz --prefix=unitdore/ HEAD \ git archive --format=zip --prefix=unitdore-v${PKGVER}/ HEAD \
> pkg/arch/unitdore-${PKGVER}.tar.gz > pkg/arch/unitdore-${PKGVER}.zip
SHA=$(sha256sum pkg/arch/unitdore-${PKGVER}.tar.gz | cut -d' ' -f1) SHA=$(sha256sum pkg/arch/unitdore-${PKGVER}.zip | cut -d' ' -f1)
# Patch PKGBUILD for local build # Patch PKGBUILD for local build
sed -i \ sed -i \
-e "s/^pkgver=.*/pkgver=${PKGVER}/" \ -e "s/^pkgver=.*/pkgver=${PKGVER}/" \
-e "s/^sha256sums=.*/sha256sums=('${SHA}')/" \ -e "s/^sha256sums=.*/sha256sums=('${SHA}')/" \
-e "s|source=.*|source=(\"unitdore-\${pkgver}.tar.gz\")|" \ -e "s|source=.*|source=(\"unitdore-\${pkgver}.zip\")|" \
pkg/arch/PKGBUILD pkg/arch/PKGBUILD
mkdir -p pkg/arch/out mkdir -p pkg/arch/out
@@ -148,6 +148,57 @@ jobs:
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
pkg-aur:
needs: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Publish to AUR
env:
AUR_SSH_KEY: ${{ secrets.AUR_SSH_KEY }}
run: |
VERSION="${{ github.event.inputs.tag || github.ref_name }}"
PKGVER="${VERSION#v}"
# Setup SSH for AUR
mkdir -p ~/.ssh
echo "$AUR_SSH_KEY" > ~/.ssh/aur
chmod 600 ~/.ssh/aur
ssh-keyscan aur.archlinux.org >> ~/.ssh/known_hosts
# Clone AUR repo
GIT_SSH_COMMAND="ssh -i ~/.ssh/aur" git clone ssh://aur@aur.archlinux.org/unitdore.git aur-repo
# Compute SHA256 of the release tarball (same URL the PKGBUILD will download)
SHA=$(curl -fsSL "https://git.warky.dev/wdevs/unitdore/archive/v${PKGVER}.zip" | sha256sum | cut -d' ' -f1)
# Update PKGBUILD — keep remote source URL, only bump version and checksum
sed -e "s/^pkgver=.*/pkgver=${PKGVER}/" \
-e "s/^pkgrel=.*/pkgrel=1/" \
-e "s/^sha256sums=.*/sha256sums=('${SHA}')/" \
pkg/arch/PKGBUILD > aur-repo/PKGBUILD
# Generate .SRCINFO inside an Arch container
docker run --rm \
-v "$PWD/aur-repo:/build" \
-w /build \
archlinux:latest \
bash -c "
pacman -Sy --noconfirm base-devel &&
useradd -m builder &&
chown -R builder:builder /build &&
runuser -u builder -- bash -c 'cd /build && makepkg --printsrcinfo > .SRCINFO'
"
# Commit and push to AUR master
cd aur-repo
git config user.email "hein@warky.dev"
git config user.name "Hein"
git add PKGBUILD .SRCINFO
git commit -m "Update to v${PKGVER}"
GIT_SSH_COMMAND="ssh -i ~/.ssh/aur" git push origin HEAD:master
pkg-deb: pkg-deb:
needs: release needs: release
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@@ -4,7 +4,7 @@ pkgver=0.1.0
pkgrel=1 pkgrel=1
pkgdesc="A door you open and close for container units — manage containers via systemd" pkgdesc="A door you open and close for container units — manage containers via systemd"
arch=('x86_64' 'aarch64') arch=('x86_64' 'aarch64')
url="https://warky.dev" url="https://git.warky.dev/wdevs/unitdore"
license=('MIT') license=('MIT')
depends=('systemd') depends=('systemd')
optdepends=( optdepends=(
@@ -13,11 +13,11 @@ optdepends=(
) )
makedepends=('go') makedepends=('go')
backup=('etc/unitdore/units.yaml') backup=('etc/unitdore/units.yaml')
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz") source=("$pkgname-$pkgver.zip::$url/archive/v$pkgver.zip")
sha256sums=('SKIP') sha256sums=('SKIP')
build() { build() {
cd "$pkgname" cd "$pkgname-v$pkgver"
export CGO_ENABLED=0 export CGO_ENABLED=0
go build \ go build \
-trimpath \ -trimpath \
@@ -26,12 +26,12 @@ build() {
} }
check() { check() {
cd "$pkgname" cd "$pkgname-v$pkgver"
go test ./... go test ./...
} }
package() { package() {
cd "$pkgname" cd "$pkgname-v$pkgver"
# Binary # Binary
install -Dm755 "$pkgname" "$pkgdir/usr/bin/$pkgname" install -Dm755 "$pkgname" "$pkgdir/usr/bin/$pkgname"

View File

@@ -4,7 +4,7 @@ Release: 1%{?dist}
Summary: Manage container units via systemd Summary: Manage container units via systemd
License: MIT License: MIT
URL: https://warky.dev URL: https://git.warky.dev/wdevs/unitdore
Source0: %{name}-%{version}.tar.gz Source0: %{name}-%{version}.tar.gz
BuildRequires: golang >= 1.23 BuildRequires: golang >= 1.23