Skip to content

Commit 24e37cc

Browse files
EwoutHbhrutledge
andauthored
GHA publish to TestPyPI guide: Update actions, environment and Python (#1087)
A bit of maintenance on the Publishing package distribution releases using GitHub Actions CI/CD workflows guide: - Update the host OS to ubuntu-latest - Update the actions/setup-python to v3 - Use Python 3.10 Co-authored-by: Brian Rutledge <[email protected]>
1 parent 07638cd commit 24e37cc

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

source/guides/github-actions-ci-cd-sample/publish-to-test-pypi.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ on: push
55
jobs:
66
build-n-publish:
77
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
8-
runs-on: ubuntu-18.04
8+
runs-on: ubuntu-latest
99

1010
steps:
1111
- uses: actions/checkout@master
12-
- name: Set up Python 3.9
13-
uses: actions/setup-python@v1
12+
- name: Set up Python 3.10
13+
uses: actions/setup-python@v3
1414
with:
15-
python-version: 3.9
15+
python-version: "3.10"
1616
- name: Install pypa/build
1717
run: >-
1818
python -m

source/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ Defining a workflow job environment
7171

7272
Now, let's add initial setup for our job. It's a process that
7373
will execute commands that we'll define later.
74-
In this guide, we'll use Ubuntu 18.04:
74+
In this guide, we'll use the latest stable Ubuntu LTS version
75+
provided by GitHub Actions:
7576

7677
.. literalinclude:: github-actions-ci-cd-sample/publish-to-test-pypi.yml
7778
:language: yaml
@@ -90,7 +91,7 @@ Then, add the following under the ``build-n-publish`` section:
9091
:end-before: Install pypa/build
9192

9293
This will download your repository into the CI runner and then
93-
install and activate Python 3.9.
94+
install and activate Python 3.10.
9495

9596
And now we can build dists from source. In this example, we'll
9697
use ``build`` package, assuming that your project has a
@@ -107,7 +108,7 @@ So add this to the steps list:
107108

108109
.. literalinclude:: github-actions-ci-cd-sample/publish-to-test-pypi.yml
109110
:language: yaml
110-
:start-after: version: 3.9
111+
:start-after: version: "3.10"
111112
:end-before: Actually publish to PyPI/TestPyPI
112113

113114

0 commit comments

Comments
 (0)