Skip to content

Commit b3ed1d2

Browse files
committed
Add publishing job
1 parent 30ff7a5 commit b3ed1d2

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

.github/workflows/ch07-packaging.yml

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,32 @@ jobs:
118118
run: python -m pip install cibuildwheel==2.3.1
119119

120120
- name: Build wheels
121-
run: python -m cibuildwheel --output-dir wheelhouse
121+
run: python -m cibuildwheel --output-dir wheels
122122
working-directory: ch07/first-python-package # You don't need this in your package
123123

124124
- uses: actions/upload-artifact@v2
125125
with:
126-
path: ./ch07/first-python-package/wheelhouse/*.whl # Update to match root of package
126+
path: ./ch07/first-python-package/wheels/*.whl # Update to match root of package
127+
128+
publish:
129+
name: Publish package
130+
if: startsWith(github.event.ref, "refs/tags")
131+
needs:
132+
- format
133+
- lint
134+
- typecheck
135+
- test
136+
- build_source_dist
137+
- build_wheels
138+
runs-on: ubuntu-latest
139+
140+
steps:
141+
- uses: actions/download-artifact@v2
142+
with:
143+
path: ./ch07/first-python-package/dist # Update to match root of package
144+
145+
- uses: pypa/gh-action-pypi-publish@v1.4.2
146+
with:
147+
user: __token__
148+
password: ${{ secrets.PYPI_API_TOKEN }}
149+
packages_dir: ${{ steps.download.outputs.download-path }} # You don't need this in your package

ch07/first-python-package/setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[metadata]
2-
name = pubpypack-harmony-daneah
2+
name = pubpypack-harmony-dane-hillard
33
version = 0.0.1
44
description = This package does amazing things.
55
long_description = file: README.md

0 commit comments

Comments
 (0)