Skip to content

Commit

Permalink
Use shared PyPi release workflow (#225)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
TheJulianJES authored Aug 2, 2023
1 parent 53603d9 commit ecdc8d5
Showing 1 changed file with 7 additions and 21 deletions.
28 changes: 7 additions & 21 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -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 }}

0 comments on commit ecdc8d5

Please sign in to comment.