Skip to content

Docs: Mark the action as deprecated #212

Done

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-action was 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 from build-metadata-action.
  • The outputs were compared on 2026-11-26, on 21 small projects, against build-metadata-action at ef8daaa on main, which holds the fixes that v0.13.5 will release. scripts/detect_dynamic_version.py was 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 of setup.py, where this action reads the setup() call, so a comment or use_scm_version=False makes a static project dynamic. And when a pyproject.toml names no project but holds a [tool.setuptools], [tool.hatch], [tool.pdm] or [tool.poetry] table, it does not read on to setup.cfg and setup.py.

Changes

All in README.md.

  1. 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-action replaces it, with a link to the section below.
  2. 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_provider empty for a project whose pyproject.toml declares the version dynamic (Fix: Report the provider of a dynamic version build-metadata-action#226).

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-workflows examples do, not @main.
  • project_type keeps a package.json or go.mod beside 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_prefix where 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 the run: 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

  1. A seventh provider. build-metadata-action also reports runtime-attr, with python_versioning_type dynamic, for a setup.py that takes its version from __version__, get_version or read_version. This action calls such a project static.
  2. Where the search stops. When pyproject.toml gives no signal, this action goes on to setup.cfg and then setup.py. build-metadata-action reads no further once pyproject.toml names the project. A project with a static [project] version and a [pbr] section left in setup.cfg is true and pbr here, and static there.
  3. No source. python_metadata_source is the nearest output, but it names the file the project name came from. For a PBR project that keeps its name in setup.cfg and pbr=True in setup.py, this action reports setup.py and python_metadata_source is setup.cfg.
  4. No project metadata. For a pyproject.toml that holds a [build-system] table alone, with no setup.cfg or setup.py beside it, this action reports false. build-metadata-action leaves python_versioning_type empty.

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.md changes, in one commit whose subject is the pull request's title: Docs: Mark the action as deprecated
  • prek run --files README.md passes

Notes for an automated author

  • markdownlint, write-good and codespell all run on the README. Its tables sit between MD013 guards; 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.

Activity

  1. added
    documentation
    on Nov 26, 2026
  2. lf-releng-code-monkey-bot commented on Nov 26, 2026

    @lf-releng-code-monkey-bot
    Contributor

    🐒 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions