fix(release): produce linux tarballs matching PKGBUILD source URLs
CI / Test (push) Successful in 29s
CI / Build (push) Successful in 31s

PKGBUILD expects pgtidy_${pkgver}_linux_{amd64,arm64}.tar.gz containing
the binary and LICENSE. The release job was only uploading plain binaries
(pgtidy-linux-amd64). Now creates tarballs alongside the plain binaries,
uploads both, and updates AUR SHA256 computation to use the tarballs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-29 15:46:53 +02:00
parent 27c2b9c002
commit e6ebb013d2
+11 -3
View File
@@ -55,6 +55,14 @@ jobs:
-ldflags "-X main.version=${VERSION}" \
-o "$NAME" ./cmd/pgtidy
echo "Built $NAME ($(ls -lh "$NAME" | awk '{print $5}'))"
if [ "$GOOS" = "linux" ]; then
PKGVER="${VERSION#v}"
TARNAME="pgtidy_${PKGVER}_${GOOS}_${GOARCH}.tar.gz"
cp "$NAME" pgtidy
tar czf "$TARNAME" pgtidy LICENSE
rm pgtidy
echo "Packed $TARNAME"
fi
done
- name: Create release and upload binaries
@@ -85,7 +93,7 @@ jobs:
exit 1
fi
for f in pgtidy-*; do
for f in pgtidy-* pgtidy_*.tar.gz; do
echo "Uploading $f..."
curl -sf -X POST "${UPLOAD_URL}?name=${f}" \
-H "Authorization: token ${GITHUB_TOKEN}" \
@@ -266,8 +274,8 @@ jobs:
echo "Publishing pgtidy-bin ${PKGVER}-${PKGREL} to AUR"
SHA_AMD64=$(curl -fsSL "https://git.warky.dev/wdevs/pgtidy/releases/download/v${PKGVER}/pgtidy-linux-amd64" | sha256sum | cut -d' ' -f1)
SHA_ARM64=$(curl -fsSL "https://git.warky.dev/wdevs/pgtidy/releases/download/v${PKGVER}/pgtidy-linux-arm64" | sha256sum | cut -d' ' -f1)
SHA_AMD64=$(curl -fsSL "https://git.warky.dev/wdevs/pgtidy/releases/download/v${PKGVER}/pgtidy_${PKGVER}_linux_amd64.tar.gz" | sha256sum | cut -d' ' -f1)
SHA_ARM64=$(curl -fsSL "https://git.warky.dev/wdevs/pgtidy/releases/download/v${PKGVER}/pgtidy_${PKGVER}_linux_arm64.tar.gz" | sha256sum | cut -d' ' -f1)
sed -e "s/^pkgver=.*/pkgver=${PKGVER}/" \
-e "s/^pkgrel=.*/pkgrel=${PKGREL}/" \