Weekly Build #26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Weekly Build | |
| on: | |
| schedule: | |
| - cron: '0 0 * * 0' # Runs every Sunday at midnight UTC | |
| workflow_dispatch: | |
| env: | |
| LATEST_KNOWN_PYTHON: '3.14' | |
| jobs: | |
| build: | |
| uses: ./.github/workflows/build.yml | |
| check-python-version: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| issues: write | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Check for new Python versions | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| latest=$(curl -s https://endoflife.date/api/python.json | \ | |
| jq -r '[.[] | select(.cycle | test("^3\\.[0-9]+$"))] | .[0].cycle') | |
| echo "Latest stable Python: $latest" | |
| echo "Known latest: $LATEST_KNOWN_PYTHON" | |
| if [ "$latest" = "$LATEST_KNOWN_PYTHON" ]; then | |
| echo "Python version is up to date." | |
| exit 0 | |
| fi | |
| # Check if an issue already exists | |
| existing=$(gh issue list --label "python-version" --state open --json number -q '.[0].number') | |
| if [ -n "$existing" ]; then | |
| echo "Issue #$existing already exists, skipping." | |
| exit 0 | |
| fi | |
| gh issue create \ | |
| --title "Update Python support to $latest" \ | |
| --label "python-version" \ | |
| --body "$(cat <<EOF | |
| Python **$latest** has been released (currently testing up to **$LATEST_KNOWN_PYTHON**). | |
| ## Required changes | |
| - [ ] Add \`$latest\` to the Python matrix in \`.github/workflows/build.yml\` (jobs/setup/strategy/matrix/python) | |
| - [ ] Add \`Programming Language :: Python :: $latest\` classifier in \`setup.py\` (in the \`classifiers=[...]\`) | |
| - [ ] Update \`LATEST_KNOWN_PYTHON\` to \`$latest\` in \`.github/workflows/weekly.yml\` (beggining of the file, env section) | |
| EOF | |
| )" |