From ecdc8d57f8e7101c6a018058dfc9b5cc5768cd21 Mon Sep 17 00:00:00 2001 From: TheJulianJES Date: Wed, 2 Aug 2023 18:48:34 +0200 Subject: [PATCH] Use shared PyPi release workflow (#225) * Use shared PyPi release workflow * Drop `with` section to use default Python version * Change trigger from `released` to published` This would also upload "pre-releases" to PyPi --- .github/workflows/publish-to-pypi.yml | 28 +++++++-------------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index 0e6d2b2..3d931cf 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -1,26 +1,12 @@ -name: Publish distributions to PyPI and TestPyPI +name: Publish distributions to PyPI + on: release: types: - - released + - published jobs: - build-and-publish: - name: Build and publish distributions to PyPI and TestPyPI - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.8 - uses: actions/setup-python@v2 - with: - python-version: 3.8 - - name: Install wheel - run: >- - pip install wheel build - - name: Build - run: >- - python3 -m build - - name: Publish distribution to PyPI - uses: pypa/gh-action-pypi-publish@master - with: - password: ${{ secrets.PYPI_TOKEN }} + shared-build-and-publish: + uses: zigpy/workflows/.github/workflows/publish-to-pypi.yml@main + secrets: + PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}