Skip to content

Commit

Permalink
Chore/pypi cd (#98)
Browse files Browse the repository at this point in the history
Adding CD pipeline to push new releases to pypi
  • Loading branch information
fmilthaler committed Jul 15, 2023
1 parent aaf6b32 commit e90ef79
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Python CD - Publish on PyPI

on:
release:
types: [published]

jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/finquant
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .[cd]
- name: Build package
run: python setup.py sdist bdist_wheel
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_FINQUANT_API_TOKEN }}
4 changes: 4 additions & 0 deletions requirements_cd.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
build
setuptools
wheel
twine
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def read_requirements(file_path):
"test": read_requirements("requirements_test.txt"),
"dev": read_requirements("requirements_dev.txt"),
"docs": read_requirements("requirements_docs.txt"),
"cd": read_requirements("requirements_cd.txt"),
}

setuptools.setup(
Expand Down

0 comments on commit e90ef79

Please sign in to comment.