Skip to content

Release script and a Prepare release button - #9

Merged
ivan-at-geonode merged 1 commit into
mainfrom
feat/release-script
Nov 26, 2026
Merged

ivan-at-geonode merged 1 commit into
mainfrom
feat/release-script

Conversation

@ivan-at-geonode

Copy link
Copy Markdown
Collaborator

Until now a release meant editing the version by hand in every file that records it, adding the changelog heading in a "Release X.Y.Z" pull request, then running Publish. This makes the first part a button. Publishing stays with Publish.

What changes

  • scripts/release.py (patch, minor, major or an exact version): sets the version everywhere this SDK records it, the same files and lines as in 495cdfd (Release 0.6.2): pyproject.toml, init.py, the User-Agent in api_client.py, configuration.py and the changelog. It turns [Unreleased] into [X.Y.Z] - date and keeps an empty [Unreleased] above, which the nightly sync bot needs. It refuses a malformed or older version, an empty [Unreleased], and any file where the version line is missing or found twice, and then writes nothing.
  • .github/workflows/prepare-release.yml, Prepare release: runs on main only, runs the script with the version from the form (passed through the environment, after --), and opens a Release X.Y.Z pull request from the integrations bot on release/X.Y.Z with the release notes in its description. If that branch exists, it stops.
  • Tests: tests/test_release.py (137 tests in the repo pass).
  • CONTRIBUTING.md: how to release, including publish_target: pypi for Publish and what to do when the release and nightly sync pull requests conflict in the changelog.

The script, its tests and the workflow are identical in geonodecom/sdk-typescript.

Checked

  • The script on a copy of main with minor gives 0.7.0 in the same files as the manual release. On the result: this SDK's own tests pass, Publish's version and changelog check passes, the package builds as 0.7.0, and the sync bot still adds entries.
  • The workflow's steps run locally against a local remote with a stubbed gh: a branch and a commit by the bot, the pull request description, and a stop on a second run. actionlint is clean.
  • Two independent reviews. Each guard has a test that fails when the guard is removed.

After merging

Run Prepare release with minor for 0.7.0, merge that pull request, then run Publish with publish_target: pypi.

Part of GEO-5334.
Done when: merged; the first run of the button releases 0.7.0.

🤖 Generated with Claude Code

Until now a release meant editing the version by hand in every file that
records it and adding the changelog heading, then running Publish.
scripts/release.py (patch, minor, major or an exact version) does those
edits and turns [Unreleased] into the version's section, keeping an empty
[Unreleased] for the nightly sync bot. The Prepare release workflow runs
it on main and opens a "Release X.Y.Z" pull request from the integrations
bot. Publishing stays with the Publish workflow. The script, its tests and
the workflow are the same in geonodecom/sdk-python and
geonodecom/sdk-typescript.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ivan-at-geonode
ivan-at-geonode merged commit 59617e5 into main Nov 26, 2026
2 checks passed
@ivan-at-geonode
ivan-at-geonode deleted the feat/release-script branch November 26, 2026 07:16
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.

1 participant