Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Langchain ai Langchain Workflow Dispatch Trigger

From Leeroopedia

Template:Metadata

Overview

Concrete tool for initiating the LangChain release pipeline, provided by the workflow_dispatch trigger on _release.yml in GitHub Actions.

Description

The _release.yml workflow supports two trigger modes:

  • workflow_dispatch -- Manual trigger from the GitHub Actions UI or API, accepting three inputs.
  • workflow_call -- Reusable workflow invocation from another workflow, accepting only the working-directory input.

The workflow enforces a branch guard: the build job only runs if the ref is refs/heads/master or the dangerous-nonmaster-release flag is explicitly set to true.

Global environment variables are set for all jobs:

  • PYTHON_VERSION: "3.11"
  • UV_FROZEN: "true"
  • UV_NO_SYNC: "true"

Usage

Trigger via the GitHub Actions "Run workflow" button or via the GitHub API / gh CLI. Provide the package directory, desired version, and optionally the non-master flag.

Code Reference

Source Location: .github/workflows/_release.yml (lines 1-41)

Workflow Definition:

name: "Package Release"
run-name: "Release ${{ inputs.working-directory }} ${{ inputs.release-version }}"
on:
  workflow_call:
    inputs:
      working-directory:
        required: true
        type: string
        description: "From which folder this pipeline executes"
  workflow_dispatch:
    inputs:
      working-directory:
        required: true
        type: string
        description: "From which folder this pipeline executes"
        default: "libs/langchain_v1"
      release-version:
        required: true
        type: string
        default: "0.1.0"
        description: "New version of package being released"
      dangerous-nonmaster-release:
        required: false
        type: boolean
        default: false
        description: "Release from a non-master branch (danger!) - Only use for hotfixes"

env:
  PYTHON_VERSION: "3.11"
  UV_FROZEN: "true"
  UV_NO_SYNC: "true"

permissions:
  contents: write

Branch Guard (build job condition):

jobs:
  build:
    if: github.ref == 'refs/heads/master' || inputs.dangerous-nonmaster-release

Invocation via gh CLI:

gh workflow run _release.yml \
  -f working-directory="libs/partners/openai" \
  -f release-version="1.1.9" \
  -f dangerous-nonmaster-release=false

I/O Contract

Direction Name Type Required Description
Input working-directory string Yes Package folder path relative to repo root (e.g., libs/partners/openai)
Input release-version string Yes (dispatch only) Target version string (e.g., "1.1.9")
Input dangerous-nonmaster-release boolean No Allow release from a non-master branch; default false
Output Pipeline execution -- -- Triggers the full build-test-publish pipeline

Usage Examples

Example 1: Standard release from GitHub UI

1. Navigate to Actions > "Package Release" workflow.
2. Click "Run workflow".
3. Set working-directory = "libs/core"
4. Set release-version = "1.2.12"
5. Leave dangerous-nonmaster-release unchecked.
6. Click "Run workflow".

Example 2: Hotfix release from a non-master branch

gh workflow run _release.yml \
  --ref hotfix/core-1.2.11-fix \
  -f working-directory="libs/core" \
  -f release-version="1.2.11.post1" \
  -f dangerous-nonmaster-release=true

Example 3: Reusable workflow invocation from another workflow

jobs:
  release-core:
    uses: ./.github/workflows/_release.yml
    with:
      working-directory: "libs/core"

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment