mirror of
https://github.com/leon-ai/leon.git
synced 2024-12-01 11:25:01 +03:00
95 lines
2.5 KiB
YAML
95 lines
2.5 KiB
YAML
name: Pre-release Python bridge
|
|
|
|
on: workflow_dispatch
|
|
|
|
env:
|
|
PIPENV_PIPFILE: bridges/python/src
|
|
PIPENV_VENV_IN_PROJECT: true
|
|
|
|
jobs:
|
|
build:
|
|
name: Build
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [windows-latest]
|
|
# os: [ubuntu-latest, macos-latest]
|
|
# os: [ubuntu-latest, macos-latest, windows-latest]
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
- name: Clone repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Install Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: 3.9.10
|
|
cache: pipenv
|
|
cache-dependency-path: bridges/python/src/Pipfile.lock
|
|
|
|
- name: Install Pipenv
|
|
run: pip install --upgrade pip && pip install pipenv==2022.7.24
|
|
|
|
- name: Install Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: lts/*
|
|
cache: npm
|
|
|
|
- name: Set Python bridge version
|
|
working-directory: bridges/python/src
|
|
run: |
|
|
echo "PYTHON_BRIDGE_VERSION=$(python -c "from version import __version__; print(__version__)")" >> $GITHUB_ENV
|
|
echo "Python bridge version: ${{ env.PYTHON_BRIDGE_VERSION }}"
|
|
|
|
- name: Install core
|
|
run: npm ci
|
|
|
|
- name: Setup Python bridge
|
|
run: npm run setup:python-bridge
|
|
|
|
- name: Build Python bridge
|
|
run: npm run build:python-bridge
|
|
|
|
- name: Upload Python bridge
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
path: bridges/python/dist/*.zip
|
|
|
|
draft-release:
|
|
name: Draft-release
|
|
needs: [build]
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Clone repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Install Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: 3.9.10
|
|
|
|
- name: Set Python bridge version
|
|
working-directory: bridges/python/src
|
|
run: |
|
|
echo "PYTHON_BRIDGE_VERSION=$(python -c "from version import __version__; print(__version__)")" >> $GITHUB_ENV
|
|
echo "Python bridge version: ${{ env.PYTHON_BRIDGE_VERSION }}"
|
|
|
|
- name: Download Python bridge
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
path: bridges/python/dist
|
|
|
|
- uses: marvinpinto/action-automatic-releases@latest
|
|
with:
|
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
automatic_release_tag: python-bridge_v${{ env.PYTHON_BRIDGE_VERSION }}
|
|
draft: true
|
|
prerelease: false
|
|
title: Python Bridge ${{ env.PYTHON_BRIDGE_VERSION }}
|
|
files: bridges/python/dist/artifact/*.zip
|