mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-06-09 08:14:49 +08:00
* Prevent gh-actions from publishing v3 unless explicitly asked to * ) says: "Wait for meeeeeee!" * Update branch name regex * Revert release-v3 changes
79 lines
1.7 KiB
YAML
Vendored
79 lines
1.7 KiB
YAML
Vendored
name: Deploy to PyPI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- release/v3/*
|
|
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
deploy-test-pypi:
|
|
name: Build and publish 📦 to TestPyPI
|
|
if: startsWith(github.ref, 'refs/heads/release/')
|
|
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: Build a binary wheel and a source tarball
|
|
run: >-
|
|
python -m
|
|
build
|
|
--sdist
|
|
--wheel
|
|
--outdir dist/
|
|
.
|
|
|
|
- name: Publish distribution 📦 to Test PyPI
|
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
with:
|
|
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
|
|
repository_url: https://test.pypi.org/legacy/
|
|
|
|
deploy-pypi:
|
|
name: Build and publish 📦 to PyPI
|
|
if: startsWith(github.ref, 'refs/heads/main')
|
|
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: 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.PYPI_API_TOKEN }}
|