Skip to content

Publish an exact calculated release version - #120

Merged
Marius Storhaug (MariusStorhaug) merged 4 commits into
read-only-version-calculationfrom
publish-calculated-version
Nov 27, 2026
Merged

Marius Storhaug (MariusStorhaug) merged 4 commits into
read-only-version-calculationfrom
publish-calculated-version

Conversation

@MariusStorhaug

@MariusStorhaug Marius Storhaug (MariusStorhaug) commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

Pass an exact version from Calculate to Publish. Publish uses it only if it matches the current release decision and target. Stable publication requires a default-branch push. This draft does not change the production release workflow.

Breaking: Stable publication requires a default-branch push

A pull request close can clean up prereleases, but cannot create a stable release. Before you adopt this version, move any stable publisher that runs on a pull request close to a default-branch push. The production transition stays in #108.

New: Publish an exact calculated version

Publish can use the unprefixed ReleaseVersion from Calculate on the same event. Pass CalculatedAt unchanged for a date-dependent prerelease. The GitHub module Version input does not change.

Migration guide
  1. Run Calculate on the commit that you intend to publish. For a prerelease, apply release:prerelease before Publish.
  2. If Calculate reports release, pass ReleaseVersion and CalculatedAt to Publish. Keep the same version settings. Use WhatIf: true to preview without writes.
  3. If you do not need a separate Calculate step, omit both inputs. Publish calculates a version when the event qualifies.
Technical details
  • Base: read-only-version-calculation at c7ec1533b970a676d69abc60127590136def82c0. Head: 25b682e998159736bcbd33ff4758d118537885ff.
  • Red: 24 local Pester 6.1.0 failures on the starting code, including an ignored ReleaseVersion and a stable release attempted on PR close. The test-only hosted run also failed as expected.
  • Green: 305 local Pester 6.1.0 tests passed with simulated writes. The repository PowerShell analyzer and action YAML checks passed. Hosted Action-Test and Linter passed at the recorded head.
  • src/Get-EventReleasePlan.ps1 gives PR 4 the exact .PullRequest that supplied the live labels, the resolved .ReleaseDecision, and the version plan. The public Calculate outputs do not change.
  • No live publication was attempted. This PR stays in draft pending rollout coordination.
Related links

Relates to #112
Depends on #120

## Summary

The separate `Release decision` job checks `main` PRs, including forks
and docs-only changes. It uses the candidate publisher inputs and the
exact labels Calculate read. A valid skip passes without a version.

This check is advisory, not required. It does not change
`.github/workflows/Release.yml`, rules, permissions outside the new job,
auto-merge, labels, releases, or tags.

## Evidence

- Failing-first parser, settings, and snapshot tests.
- 336/336 local Pester 6.1.0 tests on the integrated branch. They
include the actual bootstrap and report scripts with a shallow docs-only
fork fixture, label-only staleness at an unchanged SHA, and read-only
GitHub mocks.
- Repository PowerShell analyzer, action and workflow YAML lint, and
diff checks passed.
- Hosted [Action-Test and
Pester](https://github.com/PSModule/Release-GHRepository/actions/runs/46059063429)
and
[Super-Linter](https://github.com/PSModule/Release-GHRepository/actions/runs/46059063442)
passed at `4162e4444aa6f6dbd0328984a18097f2e8837887`.
- A live read-only GitHub merge-ref snapshot test used #118. It was not
a hosted run of the new job.

The new workflow only runs for PRs to `main`. This draft targets the
Publish branch, so the hosted checks above do not include a live
`Release decision` run.
@MariusStorhaug
Marius Storhaug (MariusStorhaug) marked this pull request as ready for review November 27, 2026 22:11
@MariusStorhaug
Marius Storhaug (MariusStorhaug) merged commit 324e60a into read-only-version-calculation Nov 27, 2026
2 of 3 checks passed
@MariusStorhaug
Marius Storhaug (MariusStorhaug) deleted the publish-calculated-version branch November 27, 2026 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant