ci: adopt release-please for automated releases#149
Open
jlav wants to merge 1 commit into
Open
Conversation
Replace the manual prepare-release workflow with release-please, consumed from OpenHands/release-actions' reusable workflows. - Add release.yml / pr.yml caller workflows (uses: OpenHands/release-actions@main) - Add release-please-config.json + .release-please-manifest.json (seed 1.0.0) - Add .github/release.yml with the exact `type:` labels from release-actions - extra-files bump every embedded version: pyproject.toml, uv.lock, frontend/package.json, frontend/package-lock.json, openhands/automation/__init__.py, openhands/automation/app.py - Set the 1.0.0 stable baseline (was 1.0.0a5; __init__/app.py/frontend were 0.1.0) - Remove prepare-release.yml (superseded); keep pypi-release.yml + tag-image.yml, which the release-please tag triggers to publish PyPI + Docker images - Update AGENTS.md release procedure
|
🚀 Deploy Preview PR Created/Updated A deploy preview has been created/updated for this PR. Deploy PR: https://github.com/OpenHands/deploy/pull/4490 Once the deploy PR's CI passes, the automation service will be deployed to the feature environment. |
mamoodi
approved these changes
Jun 3, 2026
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.
What this does
Migrates the automation repo from the manual
prepare-releaseflow torelease-please, consuming the
centralized reusable workflows from
OpenHands/release-actions(the same automation that repo uses to release itself).
This is a migration, not a greenfield add — the repo already had a homegrown
release system (manual
prepare-release.yml→ tag →pypi-release.yml+tag-image.yml) and used PEP 440 alpha versioning (1.0.0a5).Requirements (as requested)
Exact labels from release-actions.
.github/release.ymlis copied verbatim,so changelog grouping uses the same
type: feat/type: fix/ … labels. Thetype:labels andreleased: X.Y.Zlabels are created/applied by the reusablepr-title.yml/release-please.ymlworkflows — nothing reinvented here.Embedded versions auto-updated.
release-please-config.jsonextra-filesbumps every place a version is embedded, all to one repo version:
pyproject.toml[project].versionpythonrelease-typeuv.lock(root pkg)toml$.package[?(@.name.value=='openhands-automation')].versionfrontend/package.jsonjson$.versionfrontend/package-lock.jsonjson$.version+$.packages[''].versionopenhands/automation/__init__.pygeneric(# x-release-please-version)openhands/automation/app.py(FastAPIversion=)generic(# x-release-please-version)The lock files are included specifically so the release PR's own CI
(
uv sync --frozen,npm ci) stays green. Each updater was verified locallyagainst the real files with release-please 17.x — every one changes only the
intended line(s) (e.g. transitive
0.1.0deps inpackage-lock.jsonare leftuntouched).
Docker publish on tag, tagged. Handled by the existing, untouched
ghcr-build.yml(buildssha-<commit>on the release merge) +tag-image.yml(on tag push, aliases that image to
1.0.0/1.0/1/latest). Becauserelease-please creates the tag with a GitHub App token, the tag-push event
triggers these workflows (the default
GITHUB_TOKENwould not).No
simpletype, noversion.txt. Usesrelease-type: pythonplus theextra-filesupdaters above.Decisions (confirmed before implementing)
1.0.0a5isn't valid SemVer; release-please isSemVer-based and emits PEP-440-incompatible prereleases. So all version refs are
set to
1.0.0and the manifest is seeded at1.0.0; future releases are1.0.1/1.1.0/2.0.0from conventional commits.last-release-shaispinned to the current
mainHEAD so the first release only considers post-baselinecommits (no
1.0.0tag exists to anchor on, and tagging now would trigger apublish).
prepare-release.yml; kept the publishers.pypi-release.ymlandtag-image.ymlare unchanged — release-please's tag drives them.frontend/package.json(was decoupled at0.1.0)now tracks the single repo version.
Tags are bare (
include-v-in-tag: false) to match the repo's existing taghistory (
1.0.0a5) and avoid a redundantv1.0.0image tag fromtag-image.yml.Security note on
pr.ymlpr.ymlusespull_request_target(so title lint/label works on fork PRs). It issafe by the release-actions design and stays safe only because: it never checks
out or runs PR code (reads the title from the event payload only), and it does
not pass
secrets: inherit(runs onGITHUB_TOKENalone). Both invariants aredocumented inline.
Prerequisites (one-time, org/repo settings — not in this PR)
RELEASE_APP_ID/RELEASE_APP_PRIVATE_KEY(the GitHub Apprelease-please mints its token from). Without them the release workflow fails by
design — there is no
GITHUB_TOKENfallback.PR_TITLEas the commit title, so the titlerelease-please reads is the conventional one.
Verification
uv lock --checkpasses after the bump; YAML passes the repo'syamlfmtpre-commit hook (idempotent); ruff/pycodestyle/pyright pass on the edited Python.
release-please-config.json/ manifest are valid JSON; allextra-filespaths exist.