-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploy with GitHub Actions to PyPI Closes #15
- Loading branch information
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |