This public repository tests Release-GHRepository on GitHub Actions. It contains only synthetic data. Use it to verify a pinned action candidate before the producer publishes it. Test releases and tags belong to this repository only.
- Dispatch the Shelly fixture driver from
mainin the producer repository. Select a scenario and, if needed, a same-repository producer PR to test. Shelly opens a fixture PR with that exact action SHA. - Wait for a schema 2
release-fixture-resultcomment fromgithub-actions[bot]withoracle: "success"andverified: true. Match its case ID, candidate SHA, PR head, and event. For cases that need a label, use thelabeledreport. The opening event without the label runs only the fixture tests. - For a push case, follow the normal review rules and squash-merge the fixture PR. Run the producer driver again with the fixture PR number to verify the report for the exact squash commit. Close the
missing-decisionPR without merging it. Run one case at a time; each case compares the whole test release and tag inventory before and after the run.
| Case | Release label | Expected result |
|---|---|---|
preview |
release:patch |
Plan and CI pass. Publish previews the tested commit after merge and creates no tag or release. |
staged |
release:patch |
After merge, Publish consumes the same-run plan and creates one stable release and tag at the tested commit. |
one-step |
release:patch |
After merge, Publish calculates on demand and writes the same version Plan previewed, at the exact tested commit. |
configured-default |
None | Plan uses the explicit DefaultBump: patch. After merge, the staged publisher creates the release and tag. |
missing-decision |
None | A Calculate run with DefaultBump: patch succeeds. Without the default, Calculate fails. CI still runs and Verify confirms that no release or tag was created. |
skip |
release:skip |
Plan returns skip. CI passes and Publish does not run. The release and tag inventory is unchanged. |
ci-failure |
release:patch |
The PR can pass CI. After merge, CI fails deliberately on the pushed commit. Publish does not run and the inventory is unchanged. |
Use Verify the fixture result or its PR report as the verdict. The overall run fails for a deliberate missing decision or push CI failure. A missing report is not a pass. The driver reads PR comments without Actions permissions. Follow run in the report to see the separate jobs.
Start with staged to publish a stable release at fixture main. Run missing-decision and configured-default only when main points to a published stable release. After a maintenance merge or a case that did not publish, use another explicit patch case to establish a new baseline. Keep test tags and releases as evidence. Use a new case instead of rerunning a push that already published.
This layer follows fixture PR #3 and comes before the producer layers and the live comparison. Legacy-Baseline.yml verifies the published v2.0.3 (750abed0ecab02394554b610dc3aa191e75e3248) on pull requests with no write token and no release write. It never publishes.
| Job | Evidence |
|---|---|
Simulated |
Runs the unchanged src/main.ps1 from the pinned checkout. A synthetic merged-PR event drives it. gh and git are doubles that answer the two read calls and record every other call as a write. Tests: tests-baseline. The real GitHub module supplies LogGroup. |
WhatIf |
Runs the real composite with WhatIf: true and a contents: read token. It compares the release and tag inventory before and after. |
The Simulated job covers these scenarios with the legacy inputs (AutoPatching, AutoCleanup and both alias tags off, PatchLabels: release:patch): explicit patch, first stable tag v0.0.1 and a bump of the latest tag, preview with no writes, the NoRelease skip, an unnamespaced major label that overrides the patch label, and unmerged or non-main PRs. It also shows what the default inputs do: auto-patching, release:skip ignored, alias tags moved with git tag -f, and a configuration file that overrides the inputs.
Known v2.0.3 behavior that the candidate changes on purpose:
- With
AutoPatchingoff (the lane setting) and no deciding label, the "Skipping release creation" branch does not skip. It only leaves itsLogGroupblock, and the script attempts the unchanged version (v0.0.0on an empty inventory, or the latest tag again, whichghrejects). This is command evidence from the doubles. The released defaults (AutoPatchingon) patch without a label. The candidate requires a decision. release:skipis unknown to v2.0.3. With auto-patching on, it still releases.- The source of a release is the tip of
mainwhengh release createruns. The doubles cannot show it. Only a hosted write run of the legacy lane can.
The legacy lane below provides the hosted write evidence: one stable tag at the exact squash commit. The staged plan and the push CI gate exist only in the candidate. No legacy equivalent exists for those cases, so the baseline does not cover them. The doubles prove the logic only. They do not prove GitHub permissions, tag targets or the git push.
Run the baseline locally with the pinned checkout:
git clone https://github.com/PSModule/Release-GHRepository.git "$env:TEMP/legacy-action"
git -C "$env:TEMP/legacy-action" checkout 750abed0ecab02394554b610dc3aa191e75e3248
Install-PSResource -Name GitHub, PSSemVer, powershell-yaml -TrustRepository
$env:LEGACY_ACTION_PATH = "$env:TEMP/legacy-action"
Invoke-Pester -Path .\tests-baselinetests/FixtureContract.json lists the supported cases and their labels. Shelly opens a same-repository PR from release-fixture/<run-id>-<attempt> to main. It adds tests/cases/<run-id>-<attempt>.json with scenario and candidate. On a push, the suite selects a case only from the Shelly PR merged at that commit. Other PRs and pushes run the fixture tests but do not run the action.
Release-Test.yml checks out the public producer at the exact candidate SHA and runs the local action. Only the Publish job can write fixture tags and releases. Only the Verify job can add reports to the fixture PR. The fixture does not mint or use Shelly's token. Never add app credentials or real release data to this repository.
Legacy-Release-Test.yml tests the published v2.0.3 composite (PSModule/Release-GHRepository@750abed0ecab02394554b610dc3aa191e75e3248) on a real merged pull request in this repository. It does not use a separate repository.
Routing: a case file whose candidate is the v2.0.3 SHA belongs to the legacy lane. The candidate lane skips it. Any other case belongs to the candidate lane, and the legacy lane skips it. Each case runs in exactly one lane.
- Both lanes share one concurrency group and one release and tag inventory. v2.0.3 bumps the patch number of the latest release, or starts at
v0.0.1. TheGatejob calculates that tag from the inventory, andVerifyexpects exactly that one new stable release and tag at the squash commit. - Use normal review. Do not merge any other PR while a legacy case runs.
gh release createtags the current tip ofmain, so a concurrent merge breaks the case.GateandPublishstop ifmainis not the squash commit. - Shelly opens
release-fixture/<run-id>-<attempt>withrelease:patchas the only label. v2.0.3 also readsmajor,breaking,minor,featureandNoRelease, so any other label fails the case.Selectalso fails if.github/auto-release.ymlexists at the squash, because v2.0.3 lets that file override the workflow inputs. The PR adds onlytests/cases/<run-id>-<attempt>.jsonwith{"scenario":"one-step","candidate":"750abed0ecab02394554b610dc3aa191e75e3248"}. A verified single-parent squash must contain the same file.
Read-only jobs select the case, test the exact squash commit, and gate on current main and the expected tag. Only Publish has contents: write. It uses only GITHUB_TOKEN, with AutoPatching, AutoCleanup, and the alias tags turned off. v2.0.3 runs git push origin --tags, which fails without credentials, so only Publish persists the job token at checkout. Verify reports a schema 2 release-fixture-result comment on the PR.
To see what an upgrade needs, run the same scenario twice: once with the legacy SHA and once with the candidate SHA. Compare the two reports (candidate, tag, run). The differences that the candidate introduces:
| Area | v2.0.3 (legacy) | Candidate |
|---|---|---|
| Inputs | No Mode, DefaultBump or ReleasePlan |
Has all three |
| Staged plan and push CI gate | None | Yes |
| No deciding label | Patches when AutoPatching is on |
Requires a decision |
release:skip |
Unknown | Supported |
major, minor, NoRelease and similar labels |
Read without a prefix | Namespaced |
| Release source | Tip of main when gh release create runs |
Exact squash commit |
| Run the case selection and inventory tests without GitHub credentials: |
Import-Module -Name Pester -RequiredVersion 6.1.0
Invoke-Pester -Path .\tests