Skip to content

fix(ci): auto-derive PGXN version from git tag#50

Open
amogiska wants to merge 2 commits intomainfrom
amogiska/fix-pgxn-version
Open

fix(ci): auto-derive PGXN version from git tag#50
amogiska wants to merge 2 commits intomainfrom
amogiska/fix-pgxn-version

Conversation

@amogiska
Copy link
Copy Markdown
Contributor

@amogiska amogiska commented Apr 2, 2026

Summary

  • Update META.json version from stale 0.1.7 to 0.3.1
  • Add workflow step to rewrite META.json version from the git tag before pgxn-bundle, so future releases don't require manual version bumps

Context

The v0.3.1 PGXN release failed with Distribution "pg_stat_ch 0.1.7" already exists because META.json was never updated after its initial creation. The v0.3.0 release had already published 0.1.7.

Test plan

  • After merge, tag a new release (e.g., v0.3.2) to trigger the PGXN workflow
  • Verify the workflow rewrites META.json version correctly and publishes successfully

META.json version was hardcoded at 0.1.7 and never updated, causing
the v0.3.1 PGXN release to fail with "already exists". Update to 0.3.1
and add a workflow step that rewrites META.json version from the git
tag before bundling, so future releases don't need manual bumps.
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@amogiska amogiska marked this pull request as ready for review April 2, 2026 21:01
Copilot AI review requested due to automatic review settings April 2, 2026 21:01
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR automates the PGXN release process by deriving the version number from git tags, preventing the need for manual version bumps in META.json for each release. The PR also updates the static version in META.json to resolve a release conflict.

Changes:

  • Update META.json with new version numbers to resolve the failed PGXN release
  • Add a GitHub Actions workflow step that automatically rewrites META.json version from git tags during release automation

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
META.json Updates version fields from 0.1.7 to 0.3.2 in two locations (root and provides section)
.github/workflows/pgxn.yml Adds a workflow step that extracts version from git tags and rewrites META.json before bundling for PGXN release

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"docfile": "README.md",
"file": "pg_stat_ch.control",
"version": "0.1.7"
"version": "0.3.2"
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description states the version should be updated to "0.3.1" to address the failed v0.3.1 PGXN release, but the actual changes update META.json to "0.3.2" instead. This discrepancy should be clarified - either the description is incorrect or the version numbers in META.json should be 0.3.1.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants