merge
This commit is contained in:
parent
999ce405c4
commit
9d033c9e34
157 changed files with 6860 additions and 5525 deletions
7
.github/actions/poetry_caching/action.yml
vendored
7
.github/actions/poetry_caching/action.yml
vendored
|
|
@ -77,7 +77,12 @@ runs:
|
|||
POETRY_VERSION: ${{ inputs.poetry-version }}
|
||||
PYTHON_VERSION: ${{ inputs.python-version }}
|
||||
# Install poetry using the python version installed by setup-python step.
|
||||
run: pipx install "poetry==$POETRY_VERSION" --python '${{ steps.setup-python.outputs.python-path }}' --verbose
|
||||
run: |
|
||||
pipx install "poetry==$POETRY_VERSION" --python '${{ steps.setup-python.outputs.python-path }}' --verbose
|
||||
pipx ensurepath
|
||||
# Ensure the poetry binary is available in the PATH.
|
||||
# Test that the poetry binary is available.
|
||||
poetry --version
|
||||
|
||||
- name: Restore pip and poetry cached dependencies
|
||||
uses: actions/cache@v4
|
||||
|
|
|
|||
64
.github/workflows/create-release.yml
vendored
Normal file
64
.github/workflows/create-release.yml
vendored
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
name: Create Release
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: "Version to release"
|
||||
required: true
|
||||
type: string
|
||||
release_type:
|
||||
description: "Type of release (base or main)"
|
||||
required: true
|
||||
type: choice
|
||||
options:
|
||||
- base
|
||||
- main
|
||||
|
||||
env:
|
||||
POETRY_VERSION: "1.8.2"
|
||||
jobs:
|
||||
release:
|
||||
name: Build Langflow
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
version: ${{ steps.check-version.outputs.version }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install poetry
|
||||
run: pipx install poetry==$POETRY_VERSION
|
||||
- name: Set up Python 3.12
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.12"
|
||||
cache: "poetry"
|
||||
- name: Build project for distribution
|
||||
run: |
|
||||
if [ "${{ inputs.release_type }}" == "base" ]; then
|
||||
make build base=true
|
||||
else
|
||||
make build main=true
|
||||
fi
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: dist${{ inputs.release_type }}
|
||||
path: ${{ inputs.release_type == 'base' && 'src/backend/base/dist' || 'dist' }}
|
||||
create_release:
|
||||
name: Create Release Job
|
||||
runs-on: ubuntu-latest
|
||||
needs: release
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: dist${{ inputs.release_type }}
|
||||
path: dist
|
||||
- name: Create Release Notes
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
artifacts: "dist/*"
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
draft: false
|
||||
generateReleaseNotes: true
|
||||
prerelease: true
|
||||
tag: v${{ inputs.version }}
|
||||
commit: dev
|
||||
27
.github/workflows/docker-build.yml
vendored
27
.github/workflows/docker-build.yml
vendored
|
|
@ -52,3 +52,30 @@ jobs:
|
|||
push: true
|
||||
file: ${{ env.DOCKERFILE }}
|
||||
tags: ${{ env.TAGS }}
|
||||
- name: Wait for Docker Hub to propagate
|
||||
run: sleep 120
|
||||
|
||||
restart-space:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version:
|
||||
- "3.12"
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python ${{ matrix.python-version }} + Poetry ${{ env.POETRY_VERSION }}
|
||||
uses: "./.github/actions/poetry_caching"
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
poetry-version: ${{ env.POETRY_VERSION }}
|
||||
cache-key: ${{ runner.os }}-poetry-${{ env.POETRY_VERSION }}-${{ hashFiles('**/poetry.lock') }}
|
||||
- name: Install Python dependencies
|
||||
run: |
|
||||
poetry env use ${{ matrix.python-version }}
|
||||
poetry install
|
||||
|
||||
- name: Restart HuggingFace Spaces Build
|
||||
run: |
|
||||
poetry run python ./scripts/factory_restart_space.py
|
||||
env:
|
||||
HUGGINGFACE_API_TOKEN: ${{ secrets.HUGGINGFACE_API_TOKEN }}
|
||||
|
|
|
|||
21
.github/workflows/pre-release.yml
vendored
21
.github/workflows/pre-release.yml
vendored
|
|
@ -67,27 +67,30 @@ jobs:
|
|||
else
|
||||
make publish main=true
|
||||
fi
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: dist${{ inputs.release_type }}
|
||||
path: ${{ inputs.release_type == 'base' && 'src/backend/base/dist' || 'dist' }}
|
||||
|
||||
call_docker_build:
|
||||
name: Call Docker Build Workflow
|
||||
runs-on: ubuntu-latest
|
||||
needs: release
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ./.github/workflows/docker-build.yml
|
||||
with:
|
||||
version: ${{ needs.release.outputs.version }}
|
||||
release_type: ${{ inputs.release_type }}
|
||||
uses: langflow-ai/langflow/.github/workflows/docker-build.yml@dev
|
||||
with:
|
||||
version: ${{ needs.release.outputs.version }}
|
||||
release_type: ${{ inputs.release_type }}
|
||||
secrets: inherit
|
||||
|
||||
create_release:
|
||||
name: Create Release
|
||||
runs-on: ubuntu-latest
|
||||
needs: [call_docker_build, release]
|
||||
needs: [release]
|
||||
if: ${{ inputs.release_type == 'main' }}
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: dist
|
||||
name: dist${{ inputs.release_type }}
|
||||
path: dist
|
||||
- name: Create Release
|
||||
uses: ncipollo/release-action@v1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue