Skip to content

ci: add release workflows with bulk release and tag-from-main#20

Open
MikeGoldsmith wants to merge 23 commits into
open-telemetry:mainfrom
MikeGoldsmith:mike/releasing-docs
Open

ci: add release workflows with bulk release and tag-from-main#20
MikeGoldsmith wants to merge 23 commits into
open-telemetry:mainfrom
MikeGoldsmith:mike/releasing-docs

Conversation

@MikeGoldsmith

@MikeGoldsmith MikeGoldsmith commented May 15, 2026

Copy link
Copy Markdown
Member

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 the pypi GitHub environment (no repo-stored PyPI token).

Release model

Releases tag main directly. 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.

opentelemetry-python-contrib This repo
Normal release Long-lived package-release/<pkg>/v* branch Tag on main
Tag target Commit on the release branch Commit on main
Patch in current line Commits + tags on the release branch Tags on main
Backport to older minor Same branch (already exists) Branch from old tag (lazy)
Branch sprawl One branch per package per minor Branches only for backports

What'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 internals

Scripts: release prep/publish helpers, eachdist.py commands for listing publishable packages and packages with changelog fragments.

Docs: RELEASING.md covering bulk and per-package flows, backports, Trusted Publishing setup, and troubleshooting.

Prerequisites (maintainer setup, not blocking merge)

  • OTELBOT_APP_ID + OTELBOT_PRIVATE_KEY
  • PyPI trusted publisher per package (workflow _release-package.yml, environment pypi)
  • pypi GitHub environment (branch restrictions, optional reviewers)
  • Branch protection on package-release/*/v* (backports only)

Test plan

  • actionlint on new workflow files
  • Dry-run [All] Prepare release on a branch with changelog fragments
  • Confirm per-package workflows after otelbot + PyPI publishers are configured

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)
Copilot AI review requested due to automatic review settings May 15, 2026 12:32
@MikeGoldsmith MikeGoldsmith requested a review from a team as a code owner May 15, 2026 12:32
@MikeGoldsmith MikeGoldsmith added the Skip Changelog PR does not require a changelog entry label May 15, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.md with 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 and sed '$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> as PACKAGE_NAME, but scripts/build_a_package.sh uses PACKAGE_NAME to 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 uses 2.5b0.dev, and openai-agents-v2 uses 0.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`.

Comment thread RELEASING.md Outdated
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)
@MikeGoldsmith MikeGoldsmith marked this pull request as draft May 15, 2026 12:45
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)
Comment thread RELEASING.md Outdated
@MikeGoldsmith MikeGoldsmith marked this pull request as ready for review May 19, 2026 08:40
@MikeGoldsmith MikeGoldsmith moved this to Ready for review in Python PR digest May 19, 2026
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)
@MikeGoldsmith MikeGoldsmith changed the title docs: add RELEASING.md ci: port package release workflows from contrib May 19, 2026
Comment thread .github/workflows/package-release.yml Outdated
Comment thread .github/workflows/package-release.yml Outdated
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)
@MikeGoldsmith

Copy link
Copy Markdown
Member Author

I think this is ready for another review please @lmolkova @JWinermaSplunk 👍🏻

@JWinermaSplunk JWinermaSplunk left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Apologies if I am wrong, but I rechecked scripts/build_a_package.sh and it calls uv run and uv build not python3 -m build. Is this expected?

Unsure about this, but looks good otherwise!

@MikeGoldsmith

Copy link
Copy Markdown
Member Author

Apologies if I am wrong, but I rechecked scripts/build_a_package.sh and it calls uv run and uv build not python3 -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 prepare-package workflow to re-add the uv setup.

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)
Comment thread .github/workflows/package-prepare-patch-release.yml Outdated
@linux-foundation-easycla

linux-foundation-easycla Bot commented Jun 12, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

@MikeGoldsmith MikeGoldsmith force-pushed the mike/releasing-docs branch 2 times, most recently from d61a5be to 35f9d71 Compare June 12, 2026 13:08
…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.
@MikeGoldsmith MikeGoldsmith changed the title ci: port package release workflows from contrib ci: add release workflows with bulk release and tag-from-main Jun 12, 2026

@lmolkova lmolkova left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks great, just a couple of minor questions

Comment thread RELEASING.md
Comment on lines +162 to +166
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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

not for this PR: should we just convert all unreleased we have now to towncrier ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Comment thread RELEASING.md Outdated
Comment thread RELEASING.md Outdated
Rename eachdist.ini exclude_release to release_packages, omit scaffolding
packages from release workflows, and focus RELEASING.md on release steps.
@MikeGoldsmith

Copy link
Copy Markdown
Member Author

Thanks @lmolkova - I made the suggested changes. Ready for another review 😄

@github-project-automation github-project-automation Bot moved this from Ready for review to Approved PRs in Python PR digest Jun 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Skip Changelog PR does not require a changelog entry

Projects

Status: Approved PRs

Development

Successfully merging this pull request may close these issues.

4 participants