Principle:Langchain ai Langchain Release Triggering
Overview
Release Triggering is the practice of initiating a release pipeline through a controlled CI dispatch mechanism rather than through automatic branch pushes.
Description
Rather than triggering releases on every merge to the main branch, many projects use an explicit dispatch mechanism. This gives maintainers full control over when and what gets released. A manually-triggered pipeline typically accepts parameters such as:
- Working directory -- which package in the monorepo to release.
- Release version -- the intended version to publish.
- Safety flags -- options like allowing releases from non-default branches for hotfix scenarios.
This pattern separates the "merge code" action from the "publish release" action, preventing accidental releases and allowing maintainers to batch changes before cutting a release.
The same workflow definition can also be invoked programmatically via workflow_call, enabling other workflows to orchestrate releases as part of a larger automation chain.
Usage
Use release triggering when:
- A maintainer has bumped the version and is ready to publish.
- A hotfix needs to be released from a non-default branch.
- An automated orchestration workflow needs to chain a release as a sub-step.
Practical Guide
1. Maintainer navigates to the CI system's manual dispatch interface.
2. Selects the release workflow.
3. Provides required inputs:
a. Package directory (e.g., "libs/partners/openai")
b. Target version (e.g., "1.1.9")
c. (Optional) Non-default-branch flag for hotfixes
4. CI validates the branch (must be default branch unless overridden).
5. Pipeline proceeds through build, test, and publish stages.
Pseudocode:
trigger_release(
workflow = "_release.yml",
inputs = {
"working-directory": "libs/partners/openai",
"release-version": "1.1.9",
"dangerous-nonmaster-release": false
}
)
# Pipeline checks:
if branch != "master" and not inputs["dangerous-nonmaster-release"]:
abort("Releases must come from master branch")
proceed_to_build()