Skip to content

Commit e60c556

Browse files
authored
Use shared PyPi release workflow (#222)
* 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
1 parent 4291267 commit e60c556

File tree

1 file changed

+6
-20
lines changed

1 file changed

+6
-20
lines changed

.github/workflows/publish-to-pypi.yml

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,12 @@
1-
name: Publish distributions to PyPI and TestPyPI
1+
name: Publish distributions to PyPI
2+
23
on:
34
release:
45
types:
56
- published
67

78
jobs:
8-
build-and-publish:
9-
name: Build and publish distributions to PyPI and TestPyPI
10-
runs-on: ubuntu-latest
11-
steps:
12-
- uses: actions/checkout@v3
13-
- name: Set up Python 3.8
14-
uses: actions/setup-python@v4
15-
with:
16-
python-version: 3.8
17-
- name: Install wheel
18-
run: >-
19-
pip install wheel build
20-
- name: Build wheel
21-
run: >-
22-
python3 -m build
23-
- name: Publish distribution to PyPI
24-
uses: pypa/gh-action-pypi-publish@release/v1
25-
with:
26-
password: ${{ secrets.PYPI_TOKEN }}
9+
shared-build-and-publish:
10+
uses: zigpy/workflows/.github/workflows/publish-to-pypi.yml@main
11+
secrets:
12+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}

0 commit comments

Comments
 (0)