ci: add release workflows with bulk release and tag-from-main#20
ci: add release workflows with bulk release and tag-from-main#20MikeGoldsmith wants to merge 23 commits into
Conversation
Documents the per-package independent release model used by this repo, the manual end-to-end release steps with the existing build scripts, and the towncrier-based changelog flow. Calls out missing pieces explicitly: PyPI names are still TBD per package, and contrib's automated release workflows haven't been ported yet. Both tracked in the bootstrap issue. Assisted-by: Claude Opus 4.7 (1M context)
There was a problem hiding this comment.
Pull request overview
Adds release-process documentation for the repository’s independent per-package release model, including manual release steps while automated release workflows are still pending.
Changes:
- Adds
RELEASING.mdwith publishable package list and release flow. - Documents changelog, version bump, tagging/building, PyPI upload, GitHub release, and next-dev-version steps.
- Captures missing release infrastructure tracked by #15.
Comments suppressed due to low confidence (3)
RELEASING.md:98
- The release-notes extraction command does not extract the release body. In awk range patterns, the end pattern
^##also matches the starting## Version <version>line, so the range ends on the same line andsed '$d'removes the only line. Maintainers following this command would create a GitHub release with empty notes.
--notes-file <(awk '/^## Version <version>/,/^## /{print}' <package>/CHANGELOG.md | sed '$d')
RELEASING.md:76
- This uses
<pypi-name>asPACKAGE_NAME, butscripts/build_a_package.shusesPACKAGE_NAMEto locate**/$pkg_name/pyproject.toml. The document also says the PyPI names will differ from the current package directories, so the documented command will fail unless the directory/project name matches the PyPI name or the build script is updated.
PACKAGE_NAME=<pypi-name> VERSION=<version> ./scripts/build_a_package.sh
RELEASING.md:120
- The stated unstable version pattern does not match several current package versions (for example, anthropic/langchain/weaviate use
2.0b0.dev, google-genai uses2.5b0.dev, and openai-agents-v2 uses0.2.0.dev). Following this section as written could cause maintainers to bump releases to the wrong version scheme.
- **Unstable components** (everything currently in this repo): versions look
like `0.Yb0.dev` on `main`, `0.Yb0` at release time, then bump to
`0.{Y+1}b0.dev`.
Addresses Copilot review feedback: the changelog steps depend on open-telemetry#16 (towncrier setup) which hasn't merged yet. Make the dependency explicit at the top of the doc so it's obvious to any reviewer. Assisted-by: Claude Opus 4.7 (1M context)
The note belongs in the PR description as a merge-ordering signal, not in the doc itself where it would have to be removed once open-telemetry#16 lands. Assisted-by: Claude Opus 4.7 (1M context)
Replaces the manual-release documentation that was originally on this branch with the contrib release workflows for independently released packages. Every publishable package in this repo is independent, so only the per-package workflows apply (no coordinated bulk-release flow). Workflows ported: - [Package] Prepare release: cuts the release branch package-release/<pkg>/v<X>.<Y>.x; opens PRs to bump version and build the changelog via towncrier on both the release branch and main. - [Package] Prepare patch release: opens a patch-bump PR against an existing package release branch. - [Package] Release: publishes the built wheel to PyPI, creates the GitHub release, opens a back-merge PR copying the changelog to main. Supporting scripts ported: - scripts/generate_release_notes.sh - scripts/merge_changelog_to_main.sh - .github/scripts/use-cla-approved-github-bot.sh Adaptations from contrib: - Workflow package dropdowns list the 8 publishable packages in this repo. - backport.yml not ported; no release branches exist yet, will revisit when one does. - PyPI publishing uses a token (secrets.pypi_password), matching contrib. Tracked in open-telemetry#15 to migrate to PyPI trusted publishing once package names are decided and per-package publishers can be set up. RELEASING.md rewritten as a thin doc pointing at the workflows, listing the otelbot / PyPI / branch protection prerequisites, and documenting the pre-existing static "## Unreleased" entries that need manual folding on the first towncrier release per package. Assisted-by: Claude Opus 4.7 (1M context)
Discussions are not enabled on the opentelemetry-python-genai repo, and there is no `announcements` category, so the flag would cause `gh release create` to fail. Drop it for now; can be re-added in a follow-up if/when Discussions is enabled and an announcements category is created. Picked up from JWinermaSplunk's review on PR open-telemetry#20. Assisted-by: Claude Opus 4.7 (1M context)
|
I think this is ready for another review please @lmolkova @JWinermaSplunk 👍🏻 |
JWinermaSplunk
left a comment
There was a problem hiding this comment.
Apologies if I am wrong, but I rechecked
scripts/build_a_package.shand it callsuv runanduv buildnotpython3 -m build. Is this expected?
Unsure about this, but looks good otherwise!
You were right, I was looking at the other workflows (prepare-release, prepare-patch) which don't need uv. I'll updated |
build_a_package.sh uses `uv run` and `uv build`, so the runner needs uv installed. Removed by mistake earlier. Assisted-by: Claude Opus 4.7 (1M context)
d61a5be to
35f9d71
Compare
…hing Replace contrib's always-on release branches with prep and publish on main, lazy backport branches, release-all orchestration, and OIDC publishing via the pypi GitHub environment.
35f9d71 to
e22e745
Compare
lmolkova
left a comment
There was a problem hiding this comment.
Looks great, just a couple of minor questions
| fold them into the generated release section. Before the first towncrier | ||
| release of a given package, fold those entries by hand into the new | ||
| release section produced by `towncrier build` (or convert them into | ||
| fragments first). The do-not-edit comment in each `CHANGELOG.md` flags | ||
| this. |
There was a problem hiding this comment.
not for this PR: should we just convert all unreleased we have now to towncrier ?
Rename eachdist.ini exclude_release to release_packages, omit scaffolding packages from release workflows, and focus RELEASING.md on release steps.
|
Thanks @lmolkova - I made the suggested changes. Ready for another review 😄 |
…lemetry-python-genai into mike/releasing-docs
Fix pre-commit ruff-format CI failure on PR open-telemetry#20.
Summary
Adds GitHub Actions release workflows and
RELEASING.md. Bulk release is the default path; per-package workflows remain for urgent or partial releases. Publishing uses PyPI Trusted Publishing via thepypiGitHub environment (no repo-stored PyPI token).Release model
Releases tag
maindirectly. Each publish creates a tag (<pkg>==<version>) at the release commit. Backport branches (package-release/<pkg>/v*) are created lazily from an old tag only when patching an older minor line.package-release/<pkg>/v*branchmainmainmainWhat's in this PR
Workflows (
.github/workflows/):[All] Prepare release/[All] Release— bulk prepare and publish[Package] Prepare release/[Package] Release/[Package] Prepare patch release— per-package paths_prepare-release-package.yml/_release-package.yml— reusable internalsScripts: release prep/publish helpers,
eachdist.pycommands for listing publishable packages and packages with changelog fragments.Docs:
RELEASING.mdcovering bulk and per-package flows, backports, Trusted Publishing setup, and troubleshooting.Prerequisites (maintainer setup, not blocking merge)
OTELBOT_APP_ID+OTELBOT_PRIVATE_KEY_release-package.yml, environmentpypi)pypiGitHub environment (branch restrictions, optional reviewers)package-release/*/v*(backports only)Test plan
actionlinton new workflow files[All] Prepare releaseon a branch with changelog fragments