Create Release #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |