File tree Expand file tree Collapse file tree 2 files changed +48
-5
lines changed Expand file tree Collapse file tree 2 files changed +48
-5
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish Python 🐍 distribution 📦 to PyPI
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - " *"
7
+
8
+ jobs :
9
+ build :
10
+ name : Build distribution 📦
11
+ runs-on : ubuntu-latest
12
+
13
+ steps :
14
+ - uses : actions/checkout@v4
15
+ - name : Set up Python
16
+ uses : actions/setup-python@v5
17
+ with :
18
+ python-version : " 3.x"
19
+ - name : Build a binary wheel and a source tarball
20
+ run : pipx run build
21
+ - name : Store the distribution packages
22
+ uses : actions/upload-artifact@v4
23
+ with :
24
+ name : python-package-distributions
25
+ path : dist/
26
+
27
+ publish-to-pypi :
28
+ name : >-
29
+ Publish Python 🐍 distribution 📦 to PyPI
30
+ needs :
31
+ - build
32
+ runs-on : ubuntu-latest
33
+ environment :
34
+ name : pypi
35
+ url : https://pypi.org/project/pip/${{ github.ref_name }}
36
+ permissions :
37
+ id-token : write # IMPORTANT: mandatory for trusted publishing
38
+
39
+ steps :
40
+ - name : Download all the dists
41
+ uses : actions/download-artifact@v4
42
+ with :
43
+ name : python-package-distributions
44
+ path : dist/
45
+ - name : Publish distribution 📦 to PyPI
46
+ uses : pypa/gh-action-pypi-publish@release/v1
Original file line number Diff line number Diff line change @@ -146,11 +146,8 @@ Creating a new release
146
146
This will update the relevant files and tag the correct commit.
147
147
#. Submit the ``release/YY.N `` branch as a pull request and ensure CI passes.
148
148
Merge the changes back into ``main `` and pull them back locally.
149
- #. Build the release artifacts using ``nox -s build-release -- YY.N ``.
150
- This will checkout the tag, generate the distribution files to be
151
- uploaded and checkout the main branch again.
152
- #. Upload the release to PyPI using ``nox -s upload-release -- YY.N ``.
153
- #. Push the tag created by ``prepare-release ``.
149
+ #. Push the tag created by ``prepare-release ``. This will trigger the release
150
+ workflow on GitHub and publish to PyPI.
154
151
#. Regenerate the ``get-pip.py `` script in the `get-pip repository `_ (as
155
152
documented there) and commit the results.
156
153
#. Submit a Pull Request to `CPython `_ adding the new version of pip
You can’t perform that action at this time.
0 commit comments