Repository navigation
Calculate release versions without publishing - #119
Merged
Marius Storhaug (MariusStorhaug) merged 3 commits intoNov 27, 2026
Merged
Marius Storhaug (MariusStorhaug) merged 3 commits into
Marius Storhaug (MariusStorhaug) merged 3 commits into
Conversation
This was referenced Nov 27, 2026
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. <!-- ANNOUNCEMENT STOP --> ## 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. <details> <summary>Migration guide</summary> 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. </details> <details> <summary>Technical details</summary> - 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](https://github.com/PSModule/Release-GHRepository/actions/runs/46057399763) 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](https://github.com/PSModule/Release-GHRepository/actions/runs/46058615915) and [Linter](https://github.com/PSModule/Release-GHRepository/actions/runs/46058615939) 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. </details> <details> <summary>Related links</summary> - Relates to #112 - Depends on #119 </details>
Marius Storhaug (MariusStorhaug)
marked this pull request as ready for review
November 27, 2026 22:11
Marius Storhaug (MariusStorhaug)
merged commit Nov 27, 2026
08cd936
into
release-decision-gate
16 checks passed
Marius Storhaug (MariusStorhaug)
deleted the
read-only-version-calculation
branch
November 27, 2026 22:14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Set
Mode: calculateto validate a release decision and get a version without changing the repository. Existing callers stay inpublishmode unless they opt in.New: Read-only release version calculation
The action calculates a prerelease for an open pull request or a branch push that matches one. It calculates a stable version only on a push to the target repository's default branch.
Migration guide
Mode: calculateon the action step. Use a token that can read pull requests and releases in the target repository.PullRequesttoOWNER/REPO#NUMBER. The action checks the source repository, branch, and commit before it uses the pull request.DecisionandReleaseVersionfrom the step outputs. A validskiphas no version. For a date-dependent prerelease,CalculatedAtgives the UTC instant used in the calculation. Do not passReleaseVersiontoVersion; that input still selects the GitHub module.Technical details
This review covers only the Calculate mode and its outputs. The existing publisher uses the shared SemVer planner and keeps its pull request trigger and publication rules. The version input and the dedicated pull request check are separate work.
The new behavior tests failed before implementation. All 274 local Pester 6.1.0 tests passed, including 37 Calculate tests and 237 existing tests. The Calculate tests execute the action script with simulated GitHub reads and the real result writer. PowerShell lint passed for the source and changed tests. YAML lint passed for the action. No live publication was tested.
The scoped base is
d7a7565228c29a799b645342ea5dec3cec872fc6onrelease-decision-gate. This draft is for review only.Related links