📦 chore(pre-release-base.yml): add pre-release workflow for base project
📦 chore(pre-release-langflow.yml): add pre-release workflow for langflow project
This commit is contained in:
parent
c88a134815
commit
4c04b1ef1c
2 changed files with 74 additions and 3 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
name: pre-release
|
name: pre-release-base
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
@ -27,7 +27,7 @@ jobs:
|
||||||
python-version: "3.10"
|
python-version: "3.10"
|
||||||
cache: "poetry"
|
cache: "poetry"
|
||||||
- name: Build project for distribution
|
- name: Build project for distribution
|
||||||
run: make build
|
run: make build base=true
|
||||||
- name: Check Version
|
- name: Check Version
|
||||||
id: check-version
|
id: check-version
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -46,7 +46,7 @@ jobs:
|
||||||
env:
|
env:
|
||||||
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }}
|
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
poetry publish
|
poetry publish base=true
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
71
.github/workflows/pre-release-langflow.yml
vendored
Normal file
71
.github/workflows/pre-release-langflow.yml
vendored
Normal file
|
|
@ -0,0 +1,71 @@
|
||||||
|
name: pre-release-langflow
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- closed
|
||||||
|
branches:
|
||||||
|
- dev
|
||||||
|
paths:
|
||||||
|
- "pyproject.toml"
|
||||||
|
workflow_dispatch:
|
||||||
|
workflow_run:
|
||||||
|
workflows: ["pre-release-base"]
|
||||||
|
types: [completed]
|
||||||
|
branches: [dev]
|
||||||
|
|
||||||
|
env:
|
||||||
|
POETRY_VERSION: "1.8.2"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
if_release:
|
||||||
|
if: ${{ (github.event.pull_request.merged == true) && contains(github.event.pull_request.labels.*.name, 'pre-release') }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Install poetry
|
||||||
|
run: pipx install poetry==$POETRY_VERSION && poetry self add poetry-monorepo-dependency-plugin
|
||||||
|
- name: Set up Python 3.10
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "3.10"
|
||||||
|
cache: "poetry"
|
||||||
|
- name: Build project for distribution
|
||||||
|
run: make build main=true
|
||||||
|
- name: Check Version
|
||||||
|
id: check-version
|
||||||
|
run: |
|
||||||
|
echo version=$(poetry version --short) >> $GITHUB_OUTPUT
|
||||||
|
- name: Create Release
|
||||||
|
uses: ncipollo/release-action@v1
|
||||||
|
with:
|
||||||
|
artifacts: "dist/*"
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
draft: false
|
||||||
|
generateReleaseNotes: true
|
||||||
|
prerelease: true
|
||||||
|
tag: v${{ steps.check-version.outputs.version }}
|
||||||
|
commit: dev
|
||||||
|
- name: Publish to PyPI
|
||||||
|
env:
|
||||||
|
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }}
|
||||||
|
run: |
|
||||||
|
poetry publish main=true
|
||||||
|
- 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: ./build_and_push.Dockerfile
|
||||||
|
tags: |
|
||||||
|
logspace/langflow:${{ steps.check-version.outputs.version }}
|
||||||
|
logspace/langflow:latest-dev
|
||||||
Loading…
Add table
Add a link
Reference in a new issue