Add deploy step: publish package and release notes

Fix #6369
This commit is contained in:
Bruno Oliveira
2020-01-14 20:34:12 -03:00
committed by Bruno Oliveira
parent 4a265ba38b
commit 1d3f27cef0
3 changed files with 42 additions and 5 deletions

View File

@@ -10,6 +10,9 @@ on:
push:
branches:
- master
tags:
- "*"
pull_request:
branches:
- master
@@ -154,3 +157,35 @@ jobs:
flags: ${{ runner.os }}
fail_ci_if_error: false
name: ${{ matrix.name }}
deploy:
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: "3.7"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade wheel setuptools tox
- name: Build package
run: |
python setup.py sdist bdist_wheel
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_token }}
- name: Publish GitHub release notes
env:
GH_RELEASE_NOTES_TOKEN: ${{ secrets.release_notes }}
run: |
sudo apt-get install pandoc
tox -e publish-gh-release-notes