Skip to content

Commit

Permalink
build: publish on every deploy
Browse files Browse the repository at this point in the history
Deploy with GitHub Actions to PyPI

Closes #15
  • Loading branch information
CMiksche committed Oct 16, 2021
1 parent 4f3dd23 commit ccb3e05
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
on:
release:
types:
- created
name: Publish Package
jobs:
deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8
- name: "Installs and upgrades pip, installs other dependencies and installs the package from setup.py"
run: |
# Upgrade pip
python3 -m pip install --upgrade pip
# Install build deps
python3 -m pip install pipenv setuptools wheel twine
pipenv install
# Install the package from setup.py
python3 setup.py install
- name: Build
run: |
python3 setup.py sdist bdist_wheel
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit ccb3e05

Please sign in to comment.