feat: add release automation - #67
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds GitHub Actions–based release automation to detect upstream OpenTelemetry Lambda layer releases and generate human-reviewable “prepare” PRs, then (post-merge) assemble changelog fragments, create annotated tags, and explicitly dispatch the existing release-build workflows.
Changes:
- Introduces upstream release detection (
release-check-upstream.yml) and release preparation (release-prepare.yml) automation, plus supporting scripts. - Adds post-merge changelog assembly + tag creation workflow (
release-tag.yml) and a manual “finalize” workflow (release-finalize.yml) for optional release branches. - Adds per-language
version.txtrelease state and updates release documentation; enables manual dispatch for existing release-build workflows with ref validation.
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| python/version.txt | Adds Python release state (current_version, upstream_release_tag) consumed by automation. |
| nodejs/version.txt | Adds NodeJS release state consumed by automation. |
| java/version.txt | Adds Java release state consumed by automation. |
| docs/release.md | Replaces the manual release guide with the new automated+manual hybrid procedure. |
| ci/release-prepare.sh | Generates changelog fragments and updates per-language + root release metadata based on pinned upstream submodule. |
| ci/release-finalize.sh | Updates language README title for an optional release-<tag> branch flow. |
| changelog/.gitkeep | Keeps the changelog/ directory present for fragment-based workflow. |
| .github/workflows/release-tag.yml | Post-merge: assembles fragment into CHANGELOG.md, deletes fragment, creates annotated tag, dispatches release build. |
| .github/workflows/release-prepare.yml | Manual-dispatch workflow to pin upstream submodule, run prepare script, and open a “prepare” PR. |
| .github/workflows/release-finalize.yml | Manual-dispatch workflow to create a release-<tag> branch and update README title (recovery/support flow). |
| .github/workflows/release-check-upstream.yml | Scheduled/manual upstream tag detection that can dispatch release-prepare when new releases are found. |
| .github/workflows/release-build-python.yml | Adds workflow_dispatch support with tag-ref validation gate. |
| .github/workflows/release-build-nodejs.yml | Adds workflow_dispatch support with tag-ref validation gate. |
| .github/workflows/release-build-java.yml | Adds workflow_dispatch support with tag-ref validation gate. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
pankaj101A
reviewed
Jul 28, 2026
pankaj101A
approved these changes
Jul 28, 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.
Description
Adds end-to-end GitHub Actions automation for detecting, preparing, building, and publishing Java, NodeJS, and Python Lambda layer releases. Only the final release promotion remains manual.
Complete release flow
What this PR adds
Upstream release detection
Check Upstream Releasesworkflow (also manually dispatchable).layer-javaagent/*,layer-nodejs/*,layer-python/*).upstream_release_tagin<language>/version.txt.Release Prepare.Release preparation
opentelemetry-lambdasubmodule to the selected upstream release tag.<language>/version.txt,layer-data.sh,sample-apps/template.yaml,<language>/README.md, rootREADME.md, and createschangelog/<language>-v<version>.md.prepare-<language>-v<version>PR with checklist and provenance.Changelog assembly and release tagging
CHANGELOG.mdediting across concurrent PRs.Release Taginserts the fragment intoCHANGELOG.md, removes the fragment viagit rm, commits, creates an annotated tag, and atomically pushesmain+ tag.release-tag-mainconcurrency group.Automatic release build dispatch
Release Tagexplicitly dispatchesrelease-build-<language>.ymlat that tag ref.GITHUB_TOKENtag pushes do not trigger downstreampush-triggered workflows.workflow_dispatchalongside its existing tag-push trigger.validate-refguard job rejects accidental dispatch from non-tag refs (prevents broken artifacts/releases if someone clicks "Run workflow" onmain).Release finalization (manual)
Release Finalizeis available via manual dispatch only.release-<tag>branch from the tag commit (not frommain).What does not happen automatically
Release FinalizeRelease Finalizeif arelease-<tag>branch is neededAutomated-flow simulation (Python example)
Starting state:
python/version.txthascurrent_version=1.40.0andupstream_release_tag=layer-python/0.19.0. Upstream publisheslayer-python/0.20.0.dry_run=false) findslayer-python/0.20.0 > layer-python/0.19.0, computes next version1.41.0Release Preparewithlanguage=python,version=1.41.0,otel_lambda_tag=layer-python/0.20.0opentelemetry-lambdaatlayer-python/0.20.0, captures SHA (e.g.247d46c7...)ci/release-prepare.shupdates metadata, layer data, template, READMEs, createschangelog/python-v1.41.0.mdprepare-python-v1.41.0opens with upstream tag/SHA provenance and pre-merge checklistRelease Taginserts fragment intoCHANGELOG.md, removes fragmentpython-v1.41.0, pushes main + tag atomicallyRelease Tagrunsgh workflow run release-build-python.yml --ref python-v1.41.0Safe dry-run test:
Reports what would be dispatched without creating branches or PRs.
File reference
Workflows
.github/workflows/release-check-upstream.ymlRelease Prepare.github/workflows/release-prepare.yml.github/workflows/release-tag.yml.github/workflows/release-build-java.ymlworkflow_dispatch+validate-ref).github/workflows/release-build-nodejs.ymlworkflow_dispatch+validate-ref).github/workflows/release-build-python.ymlworkflow_dispatch+validate-ref).github/workflows/release-finalize.ymlrelease-<tag>branch from tag and updates language README titleScripts
ci/release-prepare.shversion.txt,layer-data.sh,template.yaml, language README title, root README component versionsci/release-finalize.shRelease Finalizeworkflow)Metadata
java/version.txtnodejs/version.txtpython/version.txtchangelog/.gitkeepchangelog/directory exists in fresh clonesDocumentation
docs/release.mdChanges to existing release-build workflows
workflow_dispatchtrigger (no inputs — the tag is the dispatch ref).validate-refguard job that fails fast ifGITHUB_REF_NAMEdoesn't match the expected<language>-vX.Y.Zpattern.Testing
validate-refrejects dispatch from branch refs.Documentation
Updated
docs/release.mdcovering: release metadata format, prepare-PR contents and checklist, submodule provenance, concurrent-PR conflict handling, automatic post-merge flow (changelog → tag → dispatch → build → pre-release), recovery (retry build via dispatch at existing tag), and manual promotion.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.