Deploy to PyPI - Nightly #39
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: 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: Install pypa/build | |
run: >- | |
python -m | |
pip install | |
build | |
--user | |
- name: OpenBBTerminal - Update version in pyproject.toml and Edit docs | |
run: | | |
sed -i 's/name = ".*"/name = "openbb-terminal-nightly"/' pyproject.toml | |
sed -i "3s/version = \"\(.*\)\"/version = \"\1.dev$(date +%Y%m%d%H%M)\"/" pyproject.toml | |
sed -i 's|pip install openbb-terminal|pip install openbb-terminal-nightly|g' ./website/pypi.md | |
- name: OpenBBTerminal - Build a binary wheel and a source tarball | |
run: >- | |
python -m | |
build | |
--sdist | |
--wheel | |
--outdir dist/ | |
. | |
- name: OpenBBTerminal - Publish distribution 📦 to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: dist/ | |
password: ${{ secrets.NIGHTLY_PYPI_API_TOKEN_OBB_TERMINAL_NIGHTLY }} | |
- name: OpenBB Platform - Update version in pyproject.toml and Edit docs | |
run: | | |
sed -i 's/name = ".*"/name = "openbb-nightly"/' openbb_platform/pyproject.toml | |
sed -i "3s/version = \"\(.*\)\"/version = \"\1.dev$(date +%Y%m%d%H%M)\"/" openbb_platform/pyproject.toml | |
- name: OpenBB Platform - Create the dinamically generated wheel | |
run: | | |
python -m pip install poetry toml | |
python build/pypi/openbb_platform/nightly.py | |
- name: OpenBB Platform - Publish distribution 📦 to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: openbb_platform/dist/ | |
password: ${{ secrets.NIGHTLY_PYPI_API_TOKEN }} |