-
Notifications
You must be signed in to change notification settings - Fork 8
107 lines (91 loc) · 4.09 KB
/
update-python-versions.yml
File metadata and controls
107 lines (91 loc) · 4.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: Update README and pyproject.toml with supported versions
on:
workflow_dispatch:
schedule:
- cron: '0 6 * * 1' # Weekly on Monday at 6 AM UTC (after main builds)
workflow_run:
workflows: ["platforms-dispatches"]
types: [completed]
branches: [main]
jobs:
update-readme:
name: Update README with current supported versions
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install requests python-dateutil colorama packaging
- name: Generate supported versions
id: generate
run: |
python supported_versions.py ${{ secrets.IDF_VERSIONS_TXT }}
# Capture the supported Python versions for PR description
PYTHON_VERSIONS=$(jq -c '.supported_python' supported_versions.json)
echo "supported_python=$PYTHON_VERSIONS" >> $GITHUB_OUTPUT
- name: Update README and pyproject.toml with supported Python versions
run: |
python update_python_versions.py
- name: Check for changes
id: changes
run: |
if git diff --quiet README.md pyproject.toml; then
echo "has_changes=false" >> $GITHUB_OUTPUT
echo "No changes detected in README.md or pyproject.toml"
else
echo "has_changes=true" >> $GITHUB_OUTPUT
echo "Changes detected:"
git diff README.md pyproject.toml
fi
- name: Create Pull Request
if: steps.changes.outputs.has_changes == 'true'
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: |
docs: Updated README and pyproject.toml with current supported Python versions
Auto-updated by update-readme workflow based on current ESP-IDF and Python support lifecycle.
Changes:
- Updated supported Python versions in README.md based on dynamic version detection
- Updated ruff target-version and mypy python_version in pyproject.toml
- Python versions are determined by ESP-IDF lifecycle and Python EOL dates
title: "📝 Update README and pyproject.toml with current supported Python versions"
body: |
## Summary
This PR automatically updates README.md and pyproject.toml with the current supported Python versions based on our dynamic version detection system.
## Changes Made
- ✅ Updated "Supported Python versions" section in README.md
- ✅ Updated ruff `target-version` in pyproject.toml
- ✅ Updated mypy `python_version` in pyproject.toml
- 🔄 Based on ESP-IDF lifecycle and Python EOL dates
- 🤖 Generated by automated workflow
## Python Versions Updated
The following Python versions are currently supported:
```
${{ steps.generate.outputs.supported_python }}
```
## Verification
- [ ] Python versions in README match our build matrix
- [ ] pyproject.toml ruff target-version uses oldest Python version
- [ ] pyproject.toml mypy python_version uses oldest Python version
- [ ] No other sections of files were modified
- [ ] All supported versions are actively maintained
---
> **Note**: This PR was automatically created by the [update-python-versions workflow](.github/workflows/update-python-versions.yml).
> The Python versions are dynamically determined based on ESP-IDF support lifecycle.
branch: update/readme-python-versions
delete-branch: true
assignees: ${{ github.actor }}
reviewers: jakub-kocka
labels: |
documentation
automated
python-versions