mirror of
https://github.com/leon-ai/leon.git
synced 2024-12-24 17:23:23 +03:00
92 lines
2.3 KiB
YAML
92 lines
2.3 KiB
YAML
name: Pre-release TCP server
|
|
|
|
on: workflow_dispatch
|
|
|
|
env:
|
|
PIPENV_PIPFILE: tcp_server/src
|
|
PIPENV_VENV_IN_PROJECT: true
|
|
|
|
jobs:
|
|
build:
|
|
name: Build
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-20.04, 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
|
|
|
|
- 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/*
|
|
|
|
- name: Set TCP server version
|
|
working-directory: tcp_server/src
|
|
run: |
|
|
echo "TCP_SERVER_VERSION=$(python -c "from version import __version__; print(__version__)")" >> $GITHUB_ENV
|
|
|
|
- name: Display TCP server version
|
|
run: |
|
|
echo "TCP server version: ${{ env.TCP_SERVER_VERSION }}"
|
|
|
|
- name: Install core
|
|
run: npm install
|
|
|
|
- name: Set up TCP server
|
|
run: npm run setup:tcp-server
|
|
|
|
- name: Build TCP server
|
|
run: npm run build:tcp-server
|
|
|
|
- name: Upload TCP server
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
path: tcp_server/dist/*.zip
|
|
|
|
draft-release:
|
|
name: Draft-release
|
|
needs: [build]
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
|
- name: Clone repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Install Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: 3.9.10
|
|
|
|
- name: Set TCP server version
|
|
working-directory: tcp_server/src
|
|
run: |
|
|
echo "TCP_SERVER_VERSION=$(python -c "from version import __version__; print(__version__)")" >> $GITHUB_ENV
|
|
|
|
- name: Download TCP server
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
path: tcp_server/dist
|
|
|
|
- uses: marvinpinto/action-automatic-releases@latest
|
|
with:
|
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
automatic_release_tag: tcp-server_v${{ env.TCP_SERVER_VERSION }}
|
|
draft: true
|
|
prerelease: false
|
|
title: TCP Server ${{ env.TCP_SERVER_VERSION }}
|
|
files: tcp_server/dist/artifact/*.zip
|