Skip to content

Commit

Permalink
Update setup.py, LICENCE.txt, and add PyPi GitHub action. [cherry-pic…
Browse files Browse the repository at this point in the history
…ked from @KillerBOSS2019]
  • Loading branch information
mpaperno committed Jul 18, 2021
1 parent 7f8e314 commit 093f444
Show file tree
Hide file tree
Showing 3 changed files with 730 additions and 18 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/publish-to-test-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI

on: [push, release]

jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@master
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8

- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@master
with:
skip_existing: true
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
- name: Publish distribution 📦 to PyPI
if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags')) || github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
Loading

0 comments on commit 093f444

Please sign in to comment.