Repository navigation
Release script and a Prepare release button - #9
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 withPublish.What changes
scripts/release.py(patch,minor,majoror 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] - dateand 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 onmainonly, runs the script with the version from the form (passed through the environment, after--), and opens aRelease X.Y.Zpull request from the integrations bot onrelease/X.Y.Zwith the release notes in its description. If that branch exists, it stops.CONTRIBUTING.md: how to release, includingpublish_target: pypiforPublishand 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
mainwithminorgives 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.gh: a branch and a commit by the bot, the pull request description, and a stop on a second run. actionlint is clean.After merging
Run Prepare release with
minorfor 0.7.0, merge that pull request, then runPublishwithpublish_target: pypi.Part of GEO-5334.
Done when: merged; the first run of the button releases 0.7.0.
🤖 Generated with Claude Code