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
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:
@@ -105,16 +105,16 @@ jobs:
|
||||
VERSION="${{ github.event.inputs.tag || github.ref_name }}"
|
||||
PKGVER="${VERSION#v}"
|
||||
|
||||
# Source tarball — prefix=unitdore/ matches `cd "$pkgname"` in PKGBUILD
|
||||
git archive --format=tar.gz --prefix=unitdore/ HEAD \
|
||||
> pkg/arch/unitdore-${PKGVER}.tar.gz
|
||||
SHA=$(sha256sum pkg/arch/unitdore-${PKGVER}.tar.gz | cut -d' ' -f1)
|
||||
# Source archive — prefix=unitdore-vVERSION/ matches `cd "$pkgname-v$pkgver"` in PKGBUILD
|
||||
git archive --format=zip --prefix=unitdore-v${PKGVER}/ HEAD \
|
||||
> pkg/arch/unitdore-${PKGVER}.zip
|
||||
SHA=$(sha256sum pkg/arch/unitdore-${PKGVER}.zip | cut -d' ' -f1)
|
||||
|
||||
# Patch PKGBUILD for local build
|
||||
sed -i \
|
||||
-e "s/^pkgver=.*/pkgver=${PKGVER}/" \
|
||||
-e "s/^sha256sums=.*/sha256sums=('${SHA}')/" \
|
||||
-e "s|source=.*|source=(\"unitdore-\${pkgver}.tar.gz\")|" \
|
||||
-e "s|source=.*|source=(\"unitdore-\${pkgver}.zip\")|" \
|
||||
pkg/arch/PKGBUILD
|
||||
|
||||
mkdir -p pkg/arch/out
|
||||
@@ -148,6 +148,57 @@ jobs:
|
||||
env:
|
||||
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:
|
||||
needs: release
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
Reference in New Issue
Block a user