fix(release): produce linux tarballs matching PKGBUILD source URLs
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:
@@ -55,6 +55,14 @@ jobs:
|
|||||||
-ldflags "-X main.version=${VERSION}" \
|
-ldflags "-X main.version=${VERSION}" \
|
||||||
-o "$NAME" ./cmd/pgtidy
|
-o "$NAME" ./cmd/pgtidy
|
||||||
echo "Built $NAME ($(ls -lh "$NAME" | awk '{print $5}'))"
|
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
|
done
|
||||||
|
|
||||||
- name: Create release and upload binaries
|
- name: Create release and upload binaries
|
||||||
@@ -85,7 +93,7 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for f in pgtidy-*; do
|
for f in pgtidy-* pgtidy_*.tar.gz; do
|
||||||
echo "Uploading $f..."
|
echo "Uploading $f..."
|
||||||
curl -sf -X POST "${UPLOAD_URL}?name=${f}" \
|
curl -sf -X POST "${UPLOAD_URL}?name=${f}" \
|
||||||
-H "Authorization: token ${GITHUB_TOKEN}" \
|
-H "Authorization: token ${GITHUB_TOKEN}" \
|
||||||
@@ -266,8 +274,8 @@ jobs:
|
|||||||
|
|
||||||
echo "Publishing pgtidy-bin ${PKGVER}-${PKGREL} to AUR"
|
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_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-linux-arm64" | 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}/" \
|
sed -e "s/^pkgver=.*/pkgver=${PKGVER}/" \
|
||||||
-e "s/^pkgrel=.*/pkgrel=${PKGREL}/" \
|
-e "s/^pkgrel=.*/pkgrel=${PKGREL}/" \
|
||||||
|
|||||||
Reference in New Issue
Block a user