Skip to content

Commit

Permalink
Automate deployment to PyPI on release; add codecov and action badges (
Browse files Browse the repository at this point in the history
…#12)

- Automate deployment to PyPI on release
- Add codecov badge and reconfigure gh-action naming and badges
  • Loading branch information
leonarduschen authored Apr 2, 2021
1 parent 5d266f3 commit 42ad4a1
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python package
name: build-and-tests

on:
push:
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Upload Python Package

on:
release:
types: [created]

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
6 changes: 6 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
:target: https://pysloth.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status

.. image:: https://github.com/PySloth/pysloth/actions/workflows/build-and-tests.yml/badge.svg
:target: https://github.com/PySloth/pysloth

.. image:: https://codecov.io/gh/PySloth/pysloth/branch/main/graph/badge.svg?token=gAMTe66DIg
:target: https://codecov.io/gh/PySloth/pysloth

pysloth
=======
A Python package for Probabilistic Prediction
Expand Down

0 comments on commit 42ad4a1

Please sign in to comment.