Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,32 @@
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"local>ni/python-renovate-config:recommended"
],
"customManagers": [
{
"description": "Update setup-python default Python version.",
"customType": "regex",
"managerFilePatterns": [
"/^setup-python\\/(?:action.yml|README.md)$/"
],
"matchStrings": [
"default\\s*:\\s*[\"']?(?<currentValue>.+?)[\"']?\\s",
"By default, this action installs Python (?<currentValue>.+?)\\.\\s"
],
"matchStringsStrategy": "any",
"datasourceTemplate": "python-version",
"depNameTemplate": "python",
"versioningTemplate": "python"
Comment on lines +18 to +20

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mshafer-NI FYI, I tried to use datasourceTemplate=github-releases packageNameTemplate=actions/python-versions like the built-in support for uses: actions/setup-python with: python-version: 3.11.9 does. I got it to the point where it extracts the version and shows the GitHub release timestamp in the logs, but I wasn't able to get it to propose any updates.

datasourceTemplate=python-version gets its information from python.org rather than GitHub, so it will propose new versions before they are available on GitHub. Hmm, I should probably reduce minimumReleaseAge for this.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reduced the minimumReleaseAge for Python itself to 3 days.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, this is working now? Do you want to resolve the comment?

}
],
"packageRules": [
{
"description": "Update setup-python default Python version to latest 3.13.x.",
"matchDepNames": [
"python"
],
"allowedVersions": "< 3.14.0",
"minimumReleaseAge": "3 days"
}
]
}
2 changes: 1 addition & 1 deletion setup-python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The `ni/python-actions/setup-python` action installs Python and adds it to the P
It is a thin wrapper for https://github.com/actions/setup-python which is intended to
single-source the default Python version for multiple NI Python projects.

By default, this action installs Python 3.11.9.
By default, this action installs Python 3.13.17.

## Usage

Expand Down
2 changes: 1 addition & 1 deletion setup-python/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Set up Python
description: Install Python with appropriate defaults for NI Python projects.
inputs:
python-version:
default: 3.11.9
default: 3.13.17
outputs:
python-path:
value: ${{ steps.setup-python.outputs.python-path }}
Expand Down
Loading