* chore: Update dockerfile paths and branch name in render.yaml and release.yml * chore(readthedocs.yaml): remove .readthedocs.yaml file as it is no longer needed chore(base.Dockerfile): remove base.Dockerfile as it is no longer used in the project feat(cdk-docker-compose.yml): add cdk-docker-compose.yml file to set up docker-compose for backend and frontend services * move dockerignore * chore: Remove test-results/.last-run.json file * chore: Cache Node.js dependencies during workflow execution * chore: Remove npm cache from workflow and cache Node.js dependencies * chore: Update shardIndex and shardTotal values in typescript_test.yml workflow * chore: Update Playwright test command with shard and worker options
104 lines
3 KiB
YAML
104 lines
3 KiB
YAML
name: Langflow Pre-release
|
|
run-name: Langflow Pre-release by @${{ github.actor }}
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
release_package:
|
|
description: "Release package"
|
|
required: true
|
|
type: boolean
|
|
default: false
|
|
workflow_run:
|
|
workflows: ["pre-release-base"]
|
|
types: [completed]
|
|
branches: [dev]
|
|
|
|
env:
|
|
POETRY_VERSION: "1.8.2"
|
|
|
|
jobs:
|
|
release:
|
|
name: Release Langflow
|
|
if: inputs.release_package == true
|
|
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.10
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.10"
|
|
cache: "poetry"
|
|
- name: Check Version
|
|
id: check-version
|
|
run: |
|
|
version=$(poetry version --short)
|
|
last_released_version=$(curl -s "https://pypi.org/pypi/langflow/json" | jq -r '.releases | keys | .[]' | sort -V | tail -n 1)
|
|
if [ "$version" = "$last_released_version" ]; then
|
|
echo "Version $version is already released. Skipping release."
|
|
exit 1
|
|
else
|
|
echo version=$version >> $GITHUB_OUTPUT
|
|
fi
|
|
- name: Build project for distribution
|
|
run: make build main=true
|
|
- name: Display pyproject.toml langflow-base Version
|
|
run: cat pyproject.toml | grep langflow-base
|
|
- name: Publish to PyPI
|
|
env:
|
|
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }}
|
|
run: |
|
|
make publish main=true
|
|
- name: Upload Artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: dist
|
|
path: dist
|
|
|
|
docker_build:
|
|
name: Build Docker Image
|
|
runs-on: ubuntu-latest
|
|
needs: release
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
push: true
|
|
file: ./docker/build_and_push.Dockerfile
|
|
tags: |
|
|
langflowai/langflow:${{ needs.release.outputs.version }}
|
|
langflowai/langflow:1.0-alpha
|
|
|
|
create_release:
|
|
name: Create Release
|
|
runs-on: ubuntu-latest
|
|
needs: [docker_build, release]
|
|
steps:
|
|
- uses: actions/download-artifact@v4
|
|
with:
|
|
name: dist
|
|
path: dist
|
|
- name: Create Release
|
|
uses: ncipollo/release-action@v1
|
|
with:
|
|
artifacts: "dist/*"
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
draft: false
|
|
generateReleaseNotes: true
|
|
prerelease: true
|
|
tag: v${{ needs.release.outputs.version }}
|
|
commit: dev
|