mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-05 08:51:20 +00:00
49 lines
1.3 KiB
YAML
Vendored
49 lines
1.3 KiB
YAML
Vendored
name: Deploy to PyPI - Nightly
|
|
|
|
on: workflow_dispatch
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
deploy-nightly-pypi:
|
|
name: Build and publish nightly distributions 📦 to PyPI
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Setup Python 3.9
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: "3.9"
|
|
|
|
- name: Update version in pyproject.toml and Edit docs
|
|
run: |
|
|
sed -i 's/name = ".*"/name = "openbb-nightly"/' pyproject.toml
|
|
sed -i "3s/version = \"\(.*\)\"/version = \"\1.dev$(date +%Y%m%d)\"/" pyproject.toml
|
|
head pyproject.toml
|
|
sed -i 's/pip install openbb/pip install openbb-nightly/g; s/from openbb_terminal.sdk import openbb/from openbb_terminal.sdk import openbb/g' ./website/pypi.md
|
|
|
|
|
|
- name: Install pypa/build
|
|
run: >-
|
|
python -m
|
|
pip install
|
|
build
|
|
--user
|
|
|
|
- name: Build a binary wheel and a source tarball
|
|
run: >-
|
|
python -m
|
|
build
|
|
--sdist
|
|
--wheel
|
|
--outdir dist/
|
|
.
|
|
|
|
- name: Publish distribution 📦 to PyPI
|
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
with:
|
|
password: ${{ secrets.NIGHTLY_PYPI_API_TOKEN }}
|