mirror of
https://github.com/langchain-ai/langchain.git
synced 2026-10-05 09:25:14 +03:00
ci(infra): label release jobs, resolve package name in run title (#36998)
Polish the manual release workflow (`_release.yml`) so the Actions UI is readable at a glance — job display names, a run title that reflects the actual published package, and a broader partner matrix for the core-compat sanity check. ## Changes - Add `name:` labels to each job (`📦 Build distribution`, `📝 Generate release notes`, `🧪 Publish to TestPyPI`, `✅ Pre-release checks`, `🔄 Test prior partners against new core`, `🚀 Publish to PyPI`, `🏷️ Tag GitHub release`). Job IDs are unchanged, so all `needs:` references still resolve. - Rewrite `run-name` to resolve the dropdown value to the actual PyPI package name — e.g. `core` → `langchain-core`, `openai` → `langchain-openai`, with explicit remaps for the three that don't follow `langchain-{name}` (`langchain` → `langchain-classic`, `langchain_v1` → `langchain`, `standard-tests` → `langchain-tests`). `workflow_call` callers passing full `libs/...` paths and manual overrides are returned verbatim. - Simplify `test-dependents` label to `🐍 Test dependent: ${{ matrix.package.path }} (Python ${{ matrix.python-version }})`.
This commit is contained in:
1 parent
56d6e89be0
commit
87ba30f097
1 file changed
+31
-9
@@ -5,7 +5,20 @@
|
||||
# Handles version bumping, building, and publishing to PyPI with authentication.
|
||||
|
||||
name: "🚀 Package Release"
|
||||
run-name: "Release ${{ inputs.working-directory-override || inputs.working-directory }} ${{ inputs.release-version }}"
|
||||
# Run title resolves dropdown values to the published package name (e.g.
|
||||
# `core` -> `langchain-core`, `openai` -> `langchain-openai`). Falls back to
|
||||
# the raw input for override and `workflow_call` cases, which already pass
|
||||
# a full path. Three dropdown values don't follow `langchain-{name}`:
|
||||
# `langchain` -> `langchain-classic`, `langchain_v1` -> `langchain`,
|
||||
# `standard-tests` -> `langchain-tests`.
|
||||
run-name: >-
|
||||
Release ${{ inputs.working-directory-override ||
|
||||
(startsWith(inputs.working-directory, 'libs/') && inputs.working-directory) ||
|
||||
(inputs.working-directory == 'langchain' && 'langchain-classic') ||
|
||||
(inputs.working-directory == 'langchain_v1' && 'langchain') ||
|
||||
(inputs.working-directory == 'standard-tests' && 'langchain-tests') ||
|
||||
format('langchain-{0}', inputs.working-directory) }} ${{
|
||||
inputs.release-version }}
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
@@ -49,7 +62,8 @@ on:
|
||||
working-directory-override:
|
||||
required: false
|
||||
type: string
|
||||
description: "Manual override — takes precedence over dropdown (e.g. libs/partners/partner-xyz)"
|
||||
description: "Manual override — takes precedence over dropdown (e.g.
|
||||
libs/partners/partner-xyz)"
|
||||
release-version:
|
||||
required: true
|
||||
type: string
|
||||
@@ -84,6 +98,7 @@ jobs:
|
||||
# Build the distribution package and extract version info
|
||||
# Runs in isolated environment with minimal permissions for security
|
||||
build:
|
||||
name: 📦 Build distribution
|
||||
if: github.ref == 'refs/heads/master' || inputs.dangerous-nonmaster-release
|
||||
environment: Scheduled testing
|
||||
runs-on: ubuntu-latest
|
||||
@@ -139,6 +154,7 @@ jobs:
|
||||
f.write(f"pkg-name={pkg_name}\n")
|
||||
f.write(f"version={version}\n")
|
||||
release-notes:
|
||||
name: 📝 Generate release notes
|
||||
# release-notes must run before publishing because its check-tags step
|
||||
# validates version/tag state — do not remove this dependency.
|
||||
needs:
|
||||
@@ -237,6 +253,7 @@ jobs:
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
|
||||
test-pypi-publish:
|
||||
name: 🧪 Publish to TestPyPI
|
||||
# release-notes must run before publishing because its check-tags step
|
||||
# validates version/tag state — do not remove this dependency.
|
||||
needs:
|
||||
@@ -274,6 +291,7 @@ jobs:
|
||||
attestations: false
|
||||
|
||||
pre-release-checks:
|
||||
name: ✅ Pre-release checks
|
||||
needs:
|
||||
- build
|
||||
- release-notes
|
||||
@@ -424,6 +442,7 @@ jobs:
|
||||
# Test select published packages against new core
|
||||
# Done when code changes are made to langchain-core
|
||||
test-prior-published-packages-against-new-core:
|
||||
name: 🔄 Test prior partners against new core
|
||||
# Installs the new core with old partners: Installs the new unreleased core
|
||||
# alongside the previously published partner packages and runs integration tests
|
||||
needs:
|
||||
@@ -434,10 +453,9 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
if: false # temporarily skip
|
||||
strategy:
|
||||
matrix:
|
||||
partner: [anthropic]
|
||||
partner: [ anthropic ]
|
||||
fail-fast: false # Continue testing other partners if one fails
|
||||
env:
|
||||
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
@@ -514,7 +532,8 @@ jobs:
|
||||
# Test external packages that depend on langchain-core/langchain against the new release
|
||||
# Only runs for core and langchain_v1 releases to catch breaking changes before publish
|
||||
test-dependents:
|
||||
name: "🐍 Python ${{ matrix.python-version }}: ${{ matrix.package.path }}"
|
||||
name: "🐍 Test dependent: ${{ matrix.package.path }} (Python ${{
|
||||
matrix.python-version }})"
|
||||
needs:
|
||||
- build
|
||||
- release-notes
|
||||
@@ -526,12 +545,13 @@ jobs:
|
||||
# Only run for core or langchain_v1 releases.
|
||||
# Job-level 'if' does not support env context; must use inputs directly.
|
||||
if: >-
|
||||
startsWith(inputs.working-directory-override || inputs.working-directory, 'libs/core')
|
||||
|| startsWith(inputs.working-directory-override || inputs.working-directory, 'libs/langchain_v1')
|
||||
startsWith(inputs.working-directory-override || inputs.working-directory,
|
||||
'libs/core') || startsWith(inputs.working-directory-override ||
|
||||
inputs.working-directory, 'libs/langchain_v1')
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
python-version: ["3.11", "3.13"]
|
||||
python-version: [ "3.11", "3.13" ]
|
||||
package:
|
||||
- name: deepagents
|
||||
repo: langchain-ai/deepagents
|
||||
@@ -576,6 +596,7 @@ jobs:
|
||||
make test
|
||||
|
||||
publish:
|
||||
name: 🚀 Publish to PyPI
|
||||
# Publishes the package to PyPI
|
||||
needs:
|
||||
- build
|
||||
@@ -584,7 +605,7 @@ jobs:
|
||||
- pre-release-checks
|
||||
- test-dependents
|
||||
# - test-prior-published-packages-against-new-core
|
||||
# Run if all needed jobs succeeded or were skipped (test-dependents only runs for core/langchain_v1)
|
||||
# Run if all needed jobs succeeded or were skipped (test-dependents only runs for core/langchain_v1)
|
||||
if: ${{ !cancelled() && !failure() }}
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
@@ -622,6 +643,7 @@ jobs:
|
||||
attestations: false
|
||||
|
||||
mark-release:
|
||||
name: 🏷️ Tag GitHub release
|
||||
# Marks the GitHub release with the new version tag
|
||||
needs:
|
||||
- build
|
||||
|
||||
Reference in new issue
Block a user