Skip to content

Commit e57af07

Browse files
committed
Add Python 3.13/3.14 to CI matrix and classifiers
1 parent a920d08 commit e57af07

4 files changed

Lines changed: 80 additions & 3 deletions

File tree

.github/workflows/dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
python-version: ["3.10", "3.11", "3.12"]
20+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
2121

2222
steps:
2323
- uses: actions/checkout@v4

.github/workflows/stable.yml

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
python-version: ["3.10", "3.11", "3.12"]
20+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
2121

2222
steps:
2323
- uses: actions/checkout@v4
@@ -41,3 +41,72 @@ jobs:
4141
run: python ./test/unit_test/start_automation/extend_automation_test.py
4242
env:
4343
PYTHONPATH: .
44+
45+
publish:
46+
needs: unit-tests
47+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
48+
runs-on: ubuntu-latest
49+
permissions:
50+
contents: write
51+
steps:
52+
- uses: actions/checkout@v4
53+
with:
54+
fetch-depth: 0
55+
token: ${{ secrets.GITHUB_TOKEN }}
56+
- name: Set up Python
57+
uses: actions/setup-python@v5
58+
with:
59+
python-version: "3.12"
60+
- name: Bump patch version
61+
id: bump
62+
run: |
63+
python - <<'PY'
64+
import os
65+
import pathlib
66+
import re
67+
68+
path = pathlib.Path("pyproject.toml")
69+
text = path.read_text(encoding="utf-8")
70+
match = re.search(r'^version = "(\d+)\.(\d+)\.(\d+)"', text, re.M)
71+
if match is None:
72+
raise SystemExit("version line not found in pyproject.toml")
73+
major, minor, patch = map(int, match.groups())
74+
new_version = f"{major}.{minor}.{patch + 1}"
75+
new_text = re.sub(
76+
r'^version = "\d+\.\d+\.\d+"',
77+
f'version = "{new_version}"',
78+
text,
79+
count=1,
80+
flags=re.M,
81+
)
82+
path.write_text(new_text, encoding="utf-8")
83+
with open(os.environ["GITHUB_OUTPUT"], "a", encoding="utf-8") as fh:
84+
fh.write(f"new_version={new_version}\n")
85+
PY
86+
- name: Install build tools
87+
run: python -m pip install --upgrade pip build twine
88+
- name: Build package
89+
run: python -m build
90+
- name: Publish to PyPI
91+
env:
92+
TWINE_USERNAME: __token__
93+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
94+
run: python -m twine upload dist/*
95+
- name: Commit and tag version bump
96+
run: |
97+
git config user.name "github-actions[bot]"
98+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
99+
git add pyproject.toml
100+
git commit -m "Bump stable version to ${{ steps.bump.outputs.new_version }}"
101+
git tag "v${{ steps.bump.outputs.new_version }}"
102+
git push origin HEAD:main
103+
git push origin "v${{ steps.bump.outputs.new_version }}"
104+
- name: Create GitHub Release
105+
env:
106+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
107+
run: |
108+
gh release create "v${{ steps.bump.outputs.new_version }}" \
109+
--title "v${{ steps.bump.outputs.new_version }}" \
110+
--generate-notes \
111+
--latest \
112+
dist/*

dev.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Rename to dev version
22
# This is dev version
33
[build-system]
4-
requires = ["setuptools>=61.0"]
4+
requires = ["setuptools>=82.0.1"]
55
build-backend = "setuptools.build_meta"
66

77
[project]
@@ -21,6 +21,10 @@ dependencies = [
2121
]
2222
classifiers = [
2323
"Programming Language :: Python :: 3.10",
24+
"Programming Language :: Python :: 3.11",
25+
"Programming Language :: Python :: 3.12",
26+
"Programming Language :: Python :: 3.13",
27+
"Programming Language :: Python :: 3.14",
2428
"Development Status :: 4 - Beta",
2529
"Environment :: Win32 (MS Windows)",
2630
"Environment :: MacOS X",

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ dependencies = [
2121
]
2222
classifiers = [
2323
"Programming Language :: Python :: 3.10",
24+
"Programming Language :: Python :: 3.11",
25+
"Programming Language :: Python :: 3.12",
26+
"Programming Language :: Python :: 3.13",
27+
"Programming Language :: Python :: 3.14",
2428
"Development Status :: 4 - Beta",
2529
"Environment :: Win32 (MS Windows)",
2630
"Environment :: MacOS X",

0 commit comments

Comments
 (0)