From 048976d70dc1e15f24ce14cb45a16b08c12e82f5 Mon Sep 17 00:00:00 2001 From: Nat Morris Date: Tue, 31 Oct 2023 16:56:04 +0000 Subject: [PATCH] Copy pub-pypi.yml from netbox-bgp --- .github/workflows/pub-pypi.yml | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/pub-pypi.yml diff --git a/.github/workflows/pub-pypi.yml b/.github/workflows/pub-pypi.yml new file mode 100644 index 0000000..2b57e7c --- /dev/null +++ b/.github/workflows/pub-pypi.yml @@ -0,0 +1,35 @@ +name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI + +on: + release: + types: [published] + +jobs: + build-n-publish: + name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@main + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + - 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 PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }}