From 5d93be678311f2776b2f9ed72de80f50c126725d Mon Sep 17 00:00:00 2001 From: 7x11x13 Date: Tue, 28 Dec 2021 16:23:42 -0500 Subject: [PATCH] Publish to PyPI with GitHub Actions --- .github/workflows/pypi.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/pypi.yml diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml new file mode 100644 index 0000000..b6b374c --- /dev/null +++ b/.github/workflows/pypi.yml @@ -0,0 +1,28 @@ +name: pypi-publish +on: + push: + branches: [ master ] + tags: + - 'v*' +jobs: + publish: + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/v') + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.6 + - name: Install dependencies + run: | + pip install -e . + - name: Build package + run: | + pip install --upgrade build + python -m build + - name: Publish package + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file