Skip to content

refactor(release): use the shared release workflow #7980

Done

Description

@dan-petty

Problem

Action for the owner: choose design B, A or C in "Owner decision". The recommendation is B. Build nothing before this decision.

The repository template of github-workflows owns .github/workflows/release.yml. It renders a caller of the reusable release workflow of that library. This repository keeps a file of 377 lines, which also publishes the packages, five images, the attestations and the release files. Thus each library release conflicts in this file. The library made 5 releases on 2026-11-30.

A second problem exists today. release-please-config.json is also a template file. A test ran copier recopy --overwrite at v0.4.1 on a copy of this repository:

  • release.yml went from 377 lines to 32 lines. All publish jobs were gone.
  • release-please-config.json lost draft and force-tag-creation.

Row 9 of devops repos onboard writes the same rendered files (#7873). #7785 shows that the Service cannot run copier now. Do not merge a template pull request that changes one of these two files.

Facts that limit each design

  • Order (release-please 17.6.0): it creates the tag, then the draft release. Then it updates the next release pull request. The publish jobs run after that. An existing tag does not stop the creation of a second draft.
  • The repository has immutable releases. Thus the order stays: draft, files, publication.
  • A run for a later commit can create the release. This occurred for 5 of 112 releases from 2026-11-25. Thus each publish job needs the release commit, not the run commit.
  • For such a release, the provenance names the run commit. The tag v0.247.0 is at 3340382, but its MCP server provenance names d280a86.
  • The release job uses the release App in environment release, with write access to contents, issues and pull requests. The publish jobs use the job credential of GitHub Actions. No design changes these permissions.
  • Signer workflow today: the four images of the Dockerfile have release-image.yml@refs/heads/main. The devcontainer image has release.yml@refs/heads/main.

Consumers of the current path

Consumer What it reads
src/devops_cli/ci/job_time.py, tests/github/test_ci_job_time.py Six job names of the push runs of release.yml on main. Only the daily and manual runs of one ci.yml job use this check.
tests/invariants/test_workflow_contracts.py The attest steps of release.yml and release-image.yml.
tests/gate/tree_checks/image_smoke.py release-image.yml.
openspec/specs 12 specs name release.yml or release-image.yml.
RELEASE_CYCLE.md, CONTRIBUTING.md, docs/SDLC.md, ADR 0013, docs/guidelines/production-readiness.md Job names, steps and the conflict rule.
release-merge.yml The release pull request only. No change.
renovate/base.json of infra It stops Renovate updates of the library pin in release.yml.
Repository homelab Published releases and image tags v<version>. No change if the tags and the order stay.
.devcontainer/devcontainer.json The devcontainer image tag latest.
Attestation checks No check of a signer workflow was found in this code or in the other repositories of the owner.
Open items #4741, #5249, #7654, #7933 Each one changes the release path.

Options

A. Exact render, and publish.yml starts on the tag v*

The release event cannot start it: a draft starts no created event, and published comes after the files are locked.

  • Changes: new publish.yml with a job that finds the draft. The code scanning uploads get ref: refs/heads/main. job-time must read tag runs. One publication at a time needs concurrency with queue: max. A tag ruleset needs a library answer, and the owner must apply it.
  • Gains: the provenance names the release commit. A second release of one version starts no second publication (part of fix(release): one version runs two releases and leaves a draft #7933). No new library call.
  • Risk: each credential with write access to contents can push a v* tag and start a publication of that commit. No tag ruleset exists now.
  • Risk: the signer of all five images changes to a tag ref.
  • Risk: at the switch, a release commit older than the change gets a tag with no publish.yml. Nothing publishes it. By code reading, hold-release does not hold: a later push turns auto-merge on again.
  • Risk: a failed release creation after a good tag still publishes images. The repair needs two reruns.
  • Rollback: hold the releases first. If not, the old and the new path can both publish one version.

B. The template calls publish.yml of the repository (recommended)

  • Library: release.yml gets the output sha. A new answer holds the permissions of a job publish; an empty answer renders no job. With an answer, the caller runs ./.github/workflows/publish.yml only when a release was created, with tag-name and sha. Add release-please-config.json to _skip_if_exists.
  • This repository: release.yml becomes the exact render. publish.yml takes the 278 lines of the publish jobs. Only the needs, the if and the tag and commit expressions change.
  • Changes: job names get the prefix Publish / . The job-time check reads too few runs until 10 releases exist. The devcontainer signer becomes publish.yml@refs/heads/main. The image signer stays. The concurrency group becomes release.
  • Same as today: trigger, one run, order, rerun and credentials.
  • Risk: a wrong permission answer or an invalid publish.yml stops the whole run, also release-please. A call of release-image.yml has this risk today.
  • Risk: the library gets a function with one user.
  • Rollback: revert the pull request of this repository. No release hold is necessary, because each form publishes in the run that creates the release.
  • Test on a scratch copy (Copier 9.19.1): the render passes actionlint and zizmor with the repository config. A second template update, with a new pin and one new comment line, gave no conflict. The first copier update conflicts one time in release.yml: take the render. Do not adopt with copier recopy, because it also writes openspec/config.yaml and CODEOWNERS.

C. This repository owns release.yml

  • Library: an answer adds release.yml and release-please-config.json to _skip_if_exists. The workflow gets the output sha.
  • This repository: replace the release-please job (about 70 lines) with a call of the library workflow. Add a Renovate rule that moves the pin.
  • Changes: no change of publish job names, signer, trigger or order. This is the smallest change.
  • Risk: the template no longer owns the caller. A new input or permission does not arrive with copier update. This is against "one owner for each file" (templates/README.md, Owners; infra#225).
  • Test on a scratch copy: after one restore of the file at adoption, the next update had no conflict.
  • Rollback: revert the pull request.

D. Skip

Keep the current files. Repair each library update by hand. The recopy risk stays.

Cost (estimate, not measured)

Design Pull requests Tokens Time Hand-written workflow after the change
A 3 and one owner step 3 M 3 days publish.yml, about 330 lines
B 2 1.5 M 1 day publish.yml, about 290 lines
C 2 0.8 M 0.5 day release.yml, about 320 lines
D 1 for each library release 0.1 M each Continuous release.yml, 377 lines

A failed publish run

  • Today, B and C: use "Re-run failed jobs". It keeps the commit, the workflow file and the passed outputs, for 30 days. Do not use "Re-run all jobs", because the publish jobs then skip.
  • A: rerun the publish run. A rerun of all jobs needs a guard that stops for a published release.
  • All designs: a defect in the workflow needs a fix on main, which ships with the next release.

Related defects (no design replaces these items)

  • github-workflows#37: no design changes the App permissions. Here the tag exists before the draft. v0.264.0 published at 18:45:30Z while 3 workflow files of main differed from its commit. A refusal at the creation of a release is not ruled out.
  • fix(release): one version runs two releases and leaves a draft #7933: B and C keep it. Its tag guard then belongs in publish.yml (B) or release.yml (C). In run 46486938299, one step created v0.264.1 and then opened the second release pull request for that version.

Recommendation

Choose B. It ends the conflict and keeps the template as the owner of release.yml. It keeps the trigger, the order and the rerun of the publish path. It adds no way to start a publication and needs no repository setting. A has better provenance, but it changes the trust boundary and the switch can lose a release. C is cheaper, but the caller can drift from the standard.

Owner decision

Answer one question: Do you approve design B? A yes approves these two items:

  1. The library template can call a repository file .github/workflows/publish.yml.
  2. The signer workflow of the devcontainer attestation changes from release.yml to publish.yml.

If the answer is no, choose C (smallest change, the caller leaves the template) or A (tag trigger, with a tag ruleset that you apply first).

Change (after approval of B)

  1. In github-workflows: add the output sha, the permission answer, the caller job and the _skip_if_exists entry, with the template test. Make a release.
  2. In this repository, in one pull request: run copier update with the answer, and add publish.yml. Change the job names in job_time.py, the tests, the specs and the documents. Delete the conflict rule in CONTRIBUTING.md.
  3. Check the first release after the merge.

Existing tool considered

Copier (_skip_if_exists and answers), GitHub reusable workflows and release-please cover the need. No new tool and no new product code are necessary. A workflow_run trigger was rejected: it gets no job output, so it needs a script that finds the release.

Done when

  • The owner decision is on this item.
  • release.yml matches the chosen design, and the next library update has no conflict.
  • One release is published and immutable with the wheel, the sdist, SHA256SUMS.txt and the five image tags.
  • devops ci job-time reads the release image jobs.
  • A template render keeps draft and force-tag-creation.

Not proved

  • No workflow ran for this analysis. The nested job names, the permission check at start and the sha output need a live run.
  • For A: a release App tag starts a tag workflow in devtools (run 46528468373). That tag came from a published release, not from force-tag-creation.
  • A signer check outside the repositories of the owner can exist.

Activity

  1. added
    type/refactor
    scope/release
    source/agent
    status/new
    on Dec 1, 2026
  2. dan-petty commented on Dec 1, 2026

    @dan-petty
    OwnerAuthor
  3. added
    value/medium
    effort/high
    priority/p2-medium
    on Dec 1, 2026
  4. dan-petty commented on Dec 1, 2026

    @dan-petty
    OwnerAuthor

    Decision of 2026-12-01: design B. The owner asked to continue the move to the reusable workflows of dan-petty/github-workflows and to standardize on best practices, which covers this open design.

    • It keeps the publish trigger, order, rerun and credentials as they are, and the template stays the one owner of release.yml.
    • It changes the signer workflow of the devcontainer attestation from release.yml to publish.yml.

    Order: the change of the library first (a sha output, the call of publish.yml by a new answer, and release-please-config.json in _skip_if_exists), then its release, then the change of devops-cli.

  5. added
    owner/agent
    on Dec 1, 2026
  6. added
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Dec 1, 2026
  7. removed
    status/in-review
    owner/agent
    on Dec 1, 2026
  8. devops-cli-service commented on Dec 1, 2026

    @devops-cli-service
    Contributor

    Live since 2026-12-01 12:10 UTC

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

    effort/highpriority/p2-mediumscope/releasesource/agenttype/refactorvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions