5 Commits
Author SHA1 Message Date
warkanumandClaude Sonnet 4.6 27c2b9c002 fix(release): bump Node to 22 for pnpm v11 compatibility
CI / Test (push) Successful in 29s
CI / Build (push) Successful in 35s
pnpm v11 (latest) requires Node >= 22.13; Node 20 caused
ERR_UNKNOWN_BUILTIN_MODULE: node:sqlite on install.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 15:37:54 +02:00
warkanumandClaude Sonnet 4.6 05106ec368 fix(release): publish release immediately so AUR job can curl binaries
Draft releases return 404 on asset downloads, which breaks the AUR
SHA256 computation in pkg-aur. Remove draft:true so assets are publicly
accessible when downstream jobs run.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 15:37:10 +02:00
warkanumandClaude Sonnet 4.6 749b01bfa2 fix(release): guard PREV_TAG with rev-parse before using in log range
CI / Test (push) Successful in 28s
CI / Build (push) Successful in 25s
If PREV_TAG is a malformed or non-reachable tag name, git log fails
with exit 128 under set -e. Validate with git rev-parse --verify first
and fall back to a full log if it doesn't resolve.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 15:27:06 +02:00
warkanumandClaude Sonnet 4.6 249f1694ef fix(release): fix VSCode pnpm, RPM docker mount, and AUR empty repo
CI / Test (push) Successful in 27s
CI / Build (push) Successful in 25s
- VSCode: switch from npm ci to pnpm (project uses pnpm-lock.yaml)
- RPM: replace docker create+cp with docker run --rm -v mount to avoid
  missing /build directory in rockylinux:9
- AUR: guard PKGBUILD reads with -f check so first publish to an empty
  AUR repo defaults pkgrel to 1 instead of crashing

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 15:17:18 +02:00
Hein cdcce94774 fix(release): update release notes generation logic
CI / Test (push) Successful in 25s
CI / Build (push) Successful in 23s
2026-06-29 13:07:55 +02:00
+25 -25
View File
@@ -64,12 +64,11 @@ jobs:
API="${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/releases" API="${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/releases"
PREV_TAG=$(git tag --sort=-version:refname | { grep -v "^${TAG}$" || true; } | head -1) PREV_TAG=$(git tag --sort=-version:refname | { grep -v "^${TAG}$" || true; } | head -1)
if [ -n "$PREV_TAG" ]; then if [ -n "$PREV_TAG" ] && git rev-parse --verify "${PREV_TAG}" >/dev/null 2>&1; then
RANGE="${PREV_TAG}..${TAG}" NOTES=$(git log "${PREV_TAG}..${TAG}" --pretty=format:"- %s" --no-merges)
else else
RANGE="HEAD~20..HEAD" NOTES=$(git log --pretty=format:"- %s" --no-merges)
fi fi
NOTES=$(git log "$RANGE" --pretty=format:"- %s" --no-merges)
BODY="## What's changed"$'\n'"${NOTES}" BODY="## What's changed"$'\n'"${NOTES}"
BODY_JSON=$(printf '%s' "$BODY" | python3 -c 'import json,sys; print(json.dumps(sys.stdin.read()))') BODY_JSON=$(printf '%s' "$BODY" | python3 -c 'import json,sys; print(json.dumps(sys.stdin.read()))')
@@ -77,7 +76,7 @@ jobs:
RELEASE=$(curl -s -X POST "$API" \ RELEASE=$(curl -s -X POST "$API" \
-H "Authorization: token ${GITHUB_TOKEN}" \ -H "Authorization: token ${GITHUB_TOKEN}" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d "{\"tag_name\":\"${TAG}\",\"name\":\"${TAG}\",\"body\":${BODY_JSON},\"draft\":true}") -d "{\"tag_name\":\"${TAG}\",\"name\":\"${TAG}\",\"body\":${BODY_JSON}}")
echo "API response: $RELEASE" echo "API response: $RELEASE"
UPLOAD_URL=$(echo "$RELEASE" | grep -o '"upload_url":"[^"]*"' | cut -d'"' -f4 | sed 's/{[^}]*}//') UPLOAD_URL=$(echo "$RELEASE" | grep -o '"upload_url":"[^"]*"' | cut -d'"' -f4 | sed 's/{[^}]*}//')
@@ -167,7 +166,9 @@ jobs:
sed -i "s/^Version:.*/Version: ${PKGVER}/" linux/centos/pgtidy.spec sed -i "s/^Version:.*/Version: ${PKGVER}/" linux/centos/pgtidy.spec
CID=$(docker create \ mkdir -p rpm-out
docker run --rm \
-v "$(pwd):/build" \
-e GO_VER="${GO_VER}" \ -e GO_VER="${GO_VER}" \
-e PKGVER="${PKGVER}" \ -e PKGVER="${PKGVER}" \
-w /build \ -w /build \
@@ -180,19 +181,9 @@ jobs:
mkdir -p ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS} && mkdir -p ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS} &&
cp pgtidy-${PKGVER}.tar.gz ~/rpmbuild/SOURCES/ && cp pgtidy-${PKGVER}.tar.gz ~/rpmbuild/SOURCES/ &&
cp linux/centos/pgtidy.spec ~/rpmbuild/SPECS/ && cp linux/centos/pgtidy.spec ~/rpmbuild/SPECS/ &&
rpmbuild --nodeps -ba ~/rpmbuild/SPECS/pgtidy.spec rpmbuild --nodeps -ba ~/rpmbuild/SPECS/pgtidy.spec &&
") find ~/rpmbuild/RPMS/ -name '*.rpm' -exec cp {} /build/rpm-out/ \;
"
cleanup() { docker rm -f "$CID" >/dev/null 2>&1 || true; }
trap cleanup EXIT
docker cp pgtidy-${PKGVER}.tar.gz "$CID:/build/"
docker cp linux "$CID:/build/linux"
docker start -a "$CID"
mkdir -p rpm-out
docker cp "$CID:/root/rpmbuild/RPMS/." rpm-out/
trap - EXIT; cleanup
- name: Upload to release - name: Upload to release
run: | run: |
@@ -259,8 +250,13 @@ jobs:
GIT_SSH_COMMAND="ssh -o IdentitiesOnly=yes -o StrictHostKeyChecking=yes -o UserKnownHostsFile=$AUR_KNOWN_HOSTS -i $AUR_KEY_PATH" \ GIT_SSH_COMMAND="ssh -o IdentitiesOnly=yes -o StrictHostKeyChecking=yes -o UserKnownHostsFile=$AUR_KNOWN_HOSTS -i $AUR_KEY_PATH" \
git clone ssh://aur@aur.archlinux.org/pgtidy-bin.git aur-repo git clone ssh://aur@aur.archlinux.org/pgtidy-bin.git aur-repo
CURRENT_PKGVER=$(awk -F= '/^pkgver=/ {print $2; exit}' aur-repo/PKGBUILD | tr -d "[:space:]") if [ -f aur-repo/PKGBUILD ]; then
CURRENT_PKGREL=$(awk -F= '/^pkgrel=/ {print $2; exit}' aur-repo/PKGBUILD | tr -d "[:space:]") CURRENT_PKGVER=$(awk -F= '/^pkgver=/ {print $2; exit}' aur-repo/PKGBUILD | tr -d "[:space:]")
CURRENT_PKGREL=$(awk -F= '/^pkgrel=/ {print $2; exit}' aur-repo/PKGBUILD | tr -d "[:space:]")
else
CURRENT_PKGVER=""
CURRENT_PKGREL=0
fi
if [ "$CURRENT_PKGVER" = "$PKGVER" ]; then if [ "$CURRENT_PKGVER" = "$PKGVER" ]; then
PKGREL=$((CURRENT_PKGREL + 1)) PKGREL=$((CURRENT_PKGREL + 1))
@@ -312,14 +308,18 @@ jobs:
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
node-version: '20' node-version: '22'
- uses: pnpm/action-setup@v4
with:
version: latest
- name: Install and package - name: Install and package
working-directory: editors/vscode working-directory: editors/vscode
run: | run: |
npm ci pnpm install --frozen-lockfile
npm run compile pnpm run compile
npm run package pnpm run package
- name: Upload to release - name: Upload to release
run: | run: |