You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20Lines changed: 20 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -72,6 +72,26 @@ jobs:
72
72
- uses: hynek/build-and-inspect-python-package@v2
73
73
```
74
74
75
+
To also upload to PyPI:
76
+
77
+
```yaml
78
+
jobs:
79
+
check-publish-package:
80
+
name: Build, inspect, and upload our package to PyPI.
81
+
runs-on: ubuntu-latest
82
+
83
+
steps:
84
+
- uses: actions/checkout@v4
85
+
- uses: hynek/build-and-inspect-python-package@v2
86
+
id: build
87
+
- name: Download built artifact to dist/
88
+
uses: actions/download-artifact@v4
89
+
with:
90
+
name: ${{ steps.build.outputs.artifact-name }}
91
+
path: dist
92
+
- uses: pypa/gh-action-pypi-publish@release/v1
93
+
```
94
+
75
95
If you’re using a VCS tag-based version extractor like [*setuptools-scm*] and need the built package to have the correct version, you must use *actions/checkout* with `fetch-depth: 0` – unless the latest commit _is_ the version tag.
0 commit comments