Repository navigation
Release settings use release.settings.yml - #116
Draft
Marius Storhaug (MariusStorhaug) wants to merge 16 commits into
Draft
Marius Storhaug (MariusStorhaug) wants to merge 16 commits into
Marius Storhaug (MariusStorhaug) wants to merge 16 commits into
Conversation
26 tasks done
10 tasks done
Contributor
There was a problem hiding this comment.
🟢 Approved
No active review issues are reported for this change.
No open issues 🎉
What changed in this PR
This PR changes the Action’s canonical settings filename to .github\release.settings.yml, while preserving explicit custom paths and the prerequisite resolver’s settings contract.
Changes:
- Updates the default filename and documents coordinated filename/reader adoption.
- Rejects the removed conventional path and legacy-file conflicts before GitHub operations.
- Adds coverage for filename validation, custom paths, settings precedence, and dry-run behavior.
| File | Description |
|---|---|
| tests/Release-GHRepository.Tests.ps1 | Adds isolated caller tests for the filename transition and retained settings behavior. |
| src/main.ps1 | Normalizes selected paths and rejects unsupported legacy-path configurations. |
| README.md | Documents the canonical filename, legacy rejection, and custom-path usage. |
| action.yml | Changes the ConfigurationFile default to .github\release.settings.yml. |
Review effort: Balanced
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.

If your workflow uses
.github\auto-release.yml, rename the file to.github\release.settings.ymlwith a compatible published action. Update the action reference and settings path in the same workflow change. If the workflow still uses the old reader, do not rename the file.If you select a custom file, keep its path. When you use the compatible action, rename each explicit
ConfigurationFileinput toSettingsFilePath.Breaking: Release settings use release.settings.yml
SettingsFilePathnow defaults to.github\release.settings.yml. The previous default was.github\auto-release.yml. Relative paths use an explicitWorkingDirectoryinput, otherwisegithub.workspace. Explicit absolute and custom paths remain supported.The action does not read the old default file as a fallback or alias. If you select the old path explicitly, the bootstrap fails before GitHub-Script starts. This rule applies to relative, normalized, and absolute path values. If the old file exists and you select the new default path, startup also fails. The error prevents loss of repository policy during the filename change.
If you select an existing custom file, the action reads that file. If the custom file is missing and the old default file exists, startup fails. If neither file exists, the action uses its standard values and nonempty named inputs.
To update your workflow:
ConfigurationFile:input key toSettingsFilePath:. Keep any intentional custom path unchanged. If you omit the path input, no input-key change is necessary..github\release.settings.yml. Keep its valid release policy. If the workflow sets the path explicitly, update that value or omit the input. If both default files exist, combine their required policy in the new file. Then remove the old file..github\release.config.ymlis a custom path, not a discovery alias. For module repositories, keep.github\PSModule.ymlthroughSettingsPath. No separate module release settings file is necessary.falseand explicit values equal to a standard remain overrides. To clearVersionPrefixorDatePrereleaseFormat, set an empty string in the selected file.WhatIf: true. Make sure that the selected settings path, effective values, and bump source are correct. Make sure that the old default path fails before GitHub operations. Complete this check before you let the action write to GitHub.No intermediate installation is necessary for this filename change. If no default settings file exists and you omit the path input, no file change is necessary.
Before the update:
After you select the compatible published action and rename the default file:
For a custom file, change the input key but keep the existing path value:
Settings and workflow prerequisites
The compatible action must support the settings and release-label contract below. The filename change does not add these capabilities.
All 16 settings support file values and matching named inputs. This includes
Debug,Verbose,WorkingDirectory,Version, and dependencyPrerelease. The bootstrap resolves settings before GitHub-Script starts. The release script receives the resolved policy and does not read the file again.Settings resolve in this order: action standards, the selected repository file, then nonempty named inputs. An owned bump label overrides the valid effective
DefaultBump. With file policyDefaultBump: major, an omitted or empty input keeps major. An explicitDefaultBump: patchselects patch, even though patch is the standard.File selection and execution use this order:
WorkingDirectoryinput fromgithub.workspace. If you omit that input, use the workspace as the initial directory.WorkingDirectoryfrom the workspace, not the file directory.The input descriptions show the standard values. The action does not copy native policy defaults into omitted inputs. No bundled defaults file, omission token, clear flag, or
CallerOverridesinput is necessary or supported. Explicitfalseremains an override. Whitespace is a value, not an empty input. Invalid file values, nulls, unknown keys, and removed keys fail even when another input or label could override them.Empty inputs do not clear text in a file. To clear supported text settings, put empty strings in the selected file. File
Version: ''selects the latest GitHub module dependency.To override repository policy for one invocation, set only the necessary inputs:
Omit
SettingsFilePathto use the default path. An explicitly empty or whitespace-only path fails. The action treats spaces and brackets in a path as literal characters. The selector is not a settings-file key. ThePrereleaseinput still controls the GitHub module dependency, not repository prerelease mode.VersionPrefixremains configurable, with standardv. Cleanup uses the effective prefix to find the version boundary. If you change the prefix, automatic cleanup keeps releases under earlier prefixes. Close active prerelease series first, or keep those releases for separate authorized cleanup.If you also change from the v2 interface, apply these prerequisites in the same workflow update:
AutoPatching,IgnoreLabels,MajorLabels,MinorLabels, andPatchLabels. UseDefaultBumponly for an intentional patch, minor, or major override. There is nononeor date bump. IfAutoPatching: falseprevented publication, use the owned skip decision on each affected active pull request.release:patch,release:minor,release:major,release:prerelease, orrelease:skipfor release decisions. Select no more than one bump label. Prerelease mode can accompany one bump. Skip cannot accompany another owned release label. Bare, retired, and unrelated labels have no effect.issues: writefor label creation, with the necessary release and comment permissions. Subscribe toopened,reopened,synchronize,labeled,unlabeled, andclosed. Do not use a path filter that bypasses release-decision validation.pull_request_targetexecution on trusted base code. Keep candidate validation read-only. Serialize publication without cancellation. If a label is necessary before the first normal provisioning run, use authorized setup. No historical relabeling or bulk deletion is necessary.UsePRBodyAsReleaseNotesandUsePRTitleAsNotesHeadingtrue to preserve the complete release record. Their existing opt-outs remain supported.Release decisions still depend on pull-request state. Push-authoritative publication, recovery, and publication governance remain separate work.
Technical details
Source and scope
namespaced-release-labels1040867819d77ef79c88d4492e10e8a8a7b6a37brelease-settings-filenamea2921454e8ebaefc01e3cd8c2b6adff10a592a42The scoped diff contains four files, with 302 insertions and 6 deletions:
action.ymlsrc\Initialize-ReleaseConfiguration.ps1tests\Release-GHRepository.Tests.ps1README.md#109 supplies the shared schema, startup resolution, settings handoff, safe prefix matching, and paired caller workflow. This PR uses that implementation without a second settings resolver. The controller, helper module, and workflows match the validated lower source. The final startup-forwarding fixture is inherited without an upper change.
The original extraction commit is
905ced93d13306c18ddf239d8bc2a02b4b48533a. It restores treeb2eb47c43236917ba6bc489a9fea391a66f79709from source03e20b8293dd8dfb41bead3255930a5edbb2e9bb. Later merges add the prerequisite resolver changes. Current review evidence applies to the candidate above, not the original extraction.Review evidence
Pester 6.1.0 passed all 245 repository cases, with zero failures, skips, or not-run cases. PSScriptAnalyzer 1.25.0 reported no diagnostics in five PowerShell files. README Markdown lint passed. These checks use the actual bootstrap, YAML reader, settings resolver, and controller. Test doubles prevent external writes. They do not prove live publication.
Two new guard regressions failed before the guard moved and passed after it. They cover legacy-only and conflicting files before any startup output. Other filename cases cover the initial directory, file-defined execution, custom paths, omission, false, and explicit standard-value overrides.
All GitHub checks pass for
a2921454e8ebaefc01e3cd8c2b6adff10a592a42:The caller fixture stays under
runner.temp, and the token has read-only permissions. Its two calls distinguish an omitted bump from an explicit standard-valued patch. The logs show the actual startup values and the resolved policy:DebugtruefalseVerbosetruefalsePrereleasetruefalseVersion[0.43.1][0.43.1]WorkingDirectory.githubdirectoryDefaultBumpmajorfromRepositorySettingpatchfromActionInputAutoCleanupfalsefalseCreateMajorTagfalsefrom the filefalsefrom the fileDatePrereleaseFormatandVersionPrefixyyyyMMddandvremainyyyyMMddandvremainWhatIftruetrueThree additional controls use the real version library to reproduce the original cleanup examples. Own-branch cleanup now selects the expected release, including a version-like prefix. The other-branch release has zero candidates.
GitHub merges native input defaults before the action runs. It does not expose the original set of supplied keys to the composite action. The action therefore does not compare an input with its standard to infer omission. See GitHub input defaults and the runner implementation.
Standards and documentation
The review uses MSXOrg/docs at
d5bc395416fb4194c1801871990f46faf301bf8a.SettingsFilePathcontract inaction.ymland READMEThe PR text uses ASD-STE100 Issue 9 writing practices and en-US English. The language review uses the official rules and dictionary. Technical identifiers and interface names keep their exact spelling.
Route and draft status
This PR targets
namespaced-release-labels. The release workflow accepts only pull requests tomain. This route does not publish an artifact. This PR therefore has no release labels or release-decision block. TheBreakingheading states the consumer impact. The eventual publishing route must make its own release decision for the complete release.The PR remains in draft with auto-merge off. #115 depends on #111. That issue depends on #112. Successful source checks do not remove these prerequisites or authorize publication. Automated review does not replace required human approval.
The reviewed template source is
PSModule/Template-Action@634ca503a47a39ca26d72fa59c784da8118ae835. It uses the old reader. The review has no verified compatible template commit. Authorized action publication and the necessary template update remain pending.Plan and issue convergence
The filename guard, bootstrap cases, lower-fixture synchronization, and exact-head checks in #115 are complete for this scoped diff. Its native prerequisites still block integration.
Open-issue searches for
release in:titleandsettings in:titlefound six distinct issues. Only #115 matches the complete four-file change. The resolver, decision gate, publication authority, custom message, and broader settings discovery remain separate work. This PR closes no additional issue.Related references