mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-24 23:54:14 +00:00
infra: update release pipeline (#30276)
Instead of attempting to conditionally `needs` job, always run job and exit successfully if not needed.
This commit is contained in:
parent
733abcc884
commit
5e0fa2cce5
22
.github/workflows/_release.yml
vendored
22
.github/workflows/_release.yml
vendored
@ -336,7 +336,6 @@ jobs:
|
|||||||
- release-notes
|
- release-notes
|
||||||
- test-pypi-publish
|
- test-pypi-publish
|
||||||
- pre-release-checks
|
- pre-release-checks
|
||||||
if: ${{ startsWith(inputs.working-directory, 'libs/core') }}
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@ -355,17 +354,29 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# We implement this conditional as Github Actions does not have good support
|
||||||
|
# for conditionally needing steps. https://github.com/actions/runner/issues/491
|
||||||
|
- name: Check if libs/core
|
||||||
|
run: |
|
||||||
|
if [ "${{ startsWith(inputs.working-directory, 'libs/core') }}" != "true" ]; then
|
||||||
|
echo "Not in libs/core. Exiting successfully."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Set up Python + uv
|
- name: Set up Python + uv
|
||||||
|
if: startsWith(inputs.working-directory, 'libs/core')
|
||||||
uses: "./.github/actions/uv_setup"
|
uses: "./.github/actions/uv_setup"
|
||||||
with:
|
with:
|
||||||
python-version: ${{ env.PYTHON_VERSION }}
|
python-version: ${{ env.PYTHON_VERSION }}
|
||||||
|
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
|
if: startsWith(inputs.working-directory, 'libs/core')
|
||||||
with:
|
with:
|
||||||
name: dist
|
name: dist
|
||||||
path: ${{ inputs.working-directory }}/dist/
|
path: ${{ inputs.working-directory }}/dist/
|
||||||
|
|
||||||
- name: Test against ${{ matrix.partner }}
|
- name: Test against ${{ matrix.partner }}
|
||||||
|
if: startsWith(inputs.working-directory, 'libs/core')
|
||||||
run: |
|
run: |
|
||||||
# Identify latest tag
|
# Identify latest tag
|
||||||
LATEST_PACKAGE_TAG="$(
|
LATEST_PACKAGE_TAG="$(
|
||||||
@ -401,15 +412,6 @@ jobs:
|
|||||||
- test-pypi-publish
|
- test-pypi-publish
|
||||||
- pre-release-checks
|
- pre-release-checks
|
||||||
- test-prior-published-packages-against-new-core
|
- test-prior-published-packages-against-new-core
|
||||||
if: >
|
|
||||||
always() &&
|
|
||||||
needs.build.result == 'success' &&
|
|
||||||
needs.release-notes.result == 'success' &&
|
|
||||||
needs.test-pypi-publish.result == 'success' &&
|
|
||||||
needs.pre-release-checks.result == 'success' && (
|
|
||||||
(startsWith(inputs.working-directory, 'libs/core') && needs.test-prior-published-packages-against-new-core.result == 'success')
|
|
||||||
|| (!startsWith(inputs.working-directory, 'libs/core'))
|
|
||||||
)
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
# This permission is used for trusted publishing:
|
# This permission is used for trusted publishing:
|
||||||
|
Loading…
Reference in New Issue
Block a user