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
# adapted from https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/#workflow-definition
2
+
name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI
3
+
4
+
on: push
5
+
6
+
jobs:
7
+
build:
8
+
name: Build distribution 📦
9
+
runs-on: ubuntu-latest
10
+
11
+
steps:
12
+
- uses: actions/checkout@v4
13
+
with:
14
+
persist-credentials: false
15
+
- name: Set up Python
16
+
uses: actions/setup-python@v5
17
+
with:
18
+
python-version: "3.x"
19
+
- name: Install pypa/build
20
+
run: >-
21
+
python3 -m
22
+
pip install
23
+
build
24
+
--user
25
+
- name: Build a binary wheel and a source tarball
26
+
run: python3 -m build
27
+
- name: Store the distribution packages
28
+
uses: actions/upload-artifact@v4
29
+
with:
30
+
name: python-package-distributions
31
+
path: dist/
32
+
33
+
verify-tag:
34
+
name: verify tag conforms
35
+
if: startsWith(github.ref, 'refs/tags/')
36
+
runs-on: ubuntu-latest
37
+
steps:
38
+
- name: "Check tag conforms ^[0-9]+\\.[0-9]+\\.[0-9]+$"
0 commit comments