Repository navigation
Done
Labels
documentationImprovements or additions to documentation
Description
Summary
lfreleng-actions/build-metadata-action reports what this action reports, and nothing calls this action any more. Add a deprecation notice to README.md that says so and shows how to move. The repository will be archived once the notice has merged.
Line numbers are from fc31561 on main.
Background
python-project-metadata-actionwas this action's one caller, and is archived. A code search on 2026-11-26 finds no other workflow or action that calls it, in this organisation or in any other public repository.python-build-action, which keys its PBR handling on the provider, reads it frombuild-metadata-action.- The outputs were compared on 2026-11-26, on 21 small projects, against
build-metadata-actionatef8daaaonmain, which holds the fixes that v0.13.5 will release.scripts/detect_dynamic_version.pywas run as the action runs it. The mapping and the differences below are what that comparison found. - Two more differences the comparison found are defects in
build-metadata-action, which Fix: Correct Python fall-through and provider build-metadata-action#231 fixes before v0.13.5 is tagged, so the notice does not mention them. It looks for the provider in the whole text ofsetup.py, where this action reads thesetup()call, so a comment oruse_scm_version=Falsemakes a static project dynamic. And when apyproject.tomlnames no project but holds a[tool.setuptools],[tool.hatch],[tool.pdm]or[tool.poetry]table, it does not read on tosetup.cfgandsetup.py.
Changes
All in README.md.
- A notice directly under the title (line 6), as a GitHub alert block (
> [!WARNING]). It should say that:- the action is deprecated and gets no further development;
- this repository will be archived, and references to its existing tags and commits keep working after that;
lfreleng-actions/build-metadata-actionreplaces it, with a link to the section below.
- A section,
## Migrating to build-metadata-action, holding:- the replacement steps below, in place of the steps in
## Usage Example(lines 28–40); - the output mapping below;
- the four differences below;
- the release to use: v0.13.5 or later. Earlier releases leave
python_dynamic_providerempty for a project whosepyproject.tomldeclares the version dynamic (Fix: Report the provider of a dynamic version build-metadata-action#226).
- the replacement steps below, in place of the steps in
Replacement steps
- name: 'Check for dynamic project versioning'
id: dyn
uses: lfreleng-actions/build-metadata-action@0000000000000000000000000000000000000000 # REPLACE: vX.Y.Z
with:
project_type: 'python'
use_version_extract: 'false'
include_environment: 'false'
artifact_upload: 'false'
output_format: ''
python_offline_mode: 'true'
- name: 'Branch on the result'
env:
VERSIONING_TYPE: ${{ steps.dyn.outputs.python_versioning_type }}
DYNAMIC_PROVIDER: ${{ steps.dyn.outputs.python_dynamic_provider }}
run: |
echo "versioning type: $VERSIONING_TYPE"
echo "dynamic provider: $DYNAMIC_PROVIDER"- Pin by commit SHA with the placeholder, the way the
python-workflowsexamples do, not@main. project_typekeeps apackage.jsonorgo.modbeside the Python files from naming another project.- The other five inputs keep the step as quiet as this action is: no version lookup, no probe of the runner, no uploaded artefact, no job summary and no query for current Python releases.
- The step sets up Go and builds the action's binary on each run. Say so in a sentence, so that a caller expects it.
- Add
path_prefixwhere the project is not at the repository root. - The second step passes the outputs through
env:. The example at lines 35–39 expands them inside therun:block; do not carry that form over.
Output mapping
| This action | build-metadata-action |
|---|---|
dynamic_version: true or false |
python_versioning_type: dynamic or static |
dynamic_provider |
python_dynamic_provider |
source |
none |
python_dynamic_provider takes the six values this action reports (pbr, setuptools-scm, versioneer, setuptools-dynamic, hatch-vcs and pyproject-dynamic), from the same signals, and is empty for a static version.
Differences
- A seventh provider.
build-metadata-actionalso reportsruntime-attr, withpython_versioning_typedynamic, for asetup.pythat takes its version from__version__,get_versionorread_version. This action calls such a project static. - Where the search stops. When
pyproject.tomlgives no signal, this action goes on tosetup.cfgand thensetup.py.build-metadata-actionreads no further oncepyproject.tomlnames the project. A project with a static[project]version and a[pbr]section left insetup.cfgistrueandpbrhere, andstaticthere. - No
source.python_metadata_sourceis the nearest output, but it names the file the project name came from. For a PBR project that keeps its name insetup.cfgandpbr=Trueinsetup.py, this action reportssetup.pyandpython_metadata_sourceissetup.cfg. - No project metadata. For a
pyproject.tomlthat holds a[build-system]table alone, with nosetup.cfgorsetup.pybeside it, this action reportsfalse.build-metadata-actionleavespython_versioning_typeempty.
Out of scope
action.yaml,scripts/, the workflows and the tests. The action itself does not change: nothing calls it, so a warning at run time would reach nobody.- A release. The change is to the README alone.
- The other Python actions. Whether they are deprecated is for their own repositories to say.
Acceptance criteria
- The README opens, under its title, with the deprecation notice
- The migration section shows the replacement steps, maps all three outputs, states the four differences and names v0.13.5
- Only
README.mdchanges, in one commit whose subject is the pull request's title:Docs: Mark the action as deprecated -
prek run --files README.mdpasses
Notes for an automated author
markdownlint,write-goodandcodespellall run on the README. Its tables sit betweenMD013guards; the new table needs the same.- The mapping and the differences above are facts to carry over, not wording to copy. Keep the README's own voice.
- The README lists the signals the action recognises (lines 8–26). Leave that list as it is: the tags stay usable, and it documents them.
- CI: Move the Scorecard schedule to its own slot #211 asks for a change to a workflow file. It is a separate change; leave it alone.
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentation
Activity
lf-releng-code-monkey-bot commentedon Nov 26, 2026
🐒 An AI agent has proposed a change for this issue: pull request #213 (head 55d9253). The Copilot review of it is clean. An antagonistic review was requested from the review bot.