| external help file | PSPublishModule-help.xml |
|---|---|
| Module Name | PSPublishModule |
| online version | https://github.com/EvotecIT/PSPublishModule |
| schema | 2.0.0 |
Creates a module pipeline lifecycle action.
New-ConfigurationExecute -InlineScript <string> [-Name <string>] [-At <ModulePipelineActionStage>] [-WorkingDirectory <string>] [-Environment <hashtable>] [-TimeoutSeconds <int>] [-ContinueOnError] [-Disabled] [-PreferWindowsPowerShell] [<CommonParameters>]New-ConfigurationExecute -FilePath <string> [-Name <string>] [-At <ModulePipelineActionStage>] [-WorkingDirectory <string>] [-Environment <hashtable>] [-TimeoutSeconds <int>] [-ContinueOnError] [-Disabled] [-PreferWindowsPowerShell] [<CommonParameters>]New-ConfigurationExecute -ScriptBlock <scriptblock> [-Name <string>] [-At <ModulePipelineActionStage>] [-WorkingDirectory <string>] [-Environment <hashtable>] [-TimeoutSeconds <int>] [-ContinueOnError] [-Disabled] [-PreferWindowsPowerShell] [<CommonParameters>]Lifecycle actions run PowerShell at a named module pipeline context point such as AfterStaging, AfterManifest, or BeforePublish. PowerForge writes a stable JSON context file before each action and exposes its path through the POWERFORGE_CONTEXT environment variable.
Use lifecycle actions for project-specific preparation, generated-file adjustments, artifact checks, and release guardrails that need a precise pipeline context. Configuration segment order does not control execution order; the At value does.
PS> New-ConfigurationExecute -Name 'Inspect staged module' -At AfterStaging -InlineScript '$ctx = Get-Content $env:POWERFORGE_CONTEXT | ConvertFrom-Json; Get-ChildItem $ctx.ModuleRoot'Runs the inline PowerShell after the module staging context exists.
PS> New-ConfigurationExecute -Name 'Release guard' -At BeforePublish -FilePath '.\Build\Test-ReleaseReady.ps1' -TimeoutSeconds 120Runs a repository script before publish steps execute.
Stable module pipeline lifecycle point where the action runs.
Type: ModulePipelineActionStage
Parameter Sets: Inline, File, ScriptBlock
Aliases: None
Possible values: BeforeDependencies, AfterDependencies, BeforeVersioning, AfterVersioning, BeforeStaging, AfterStaging, BeforeBuild, AfterBuild, BeforeManifest, AfterManifest, BeforeDocumentation, AfterDocumentation, BeforeFormatting, AfterFormatting, BeforeValidation, AfterValidation, BeforeTests, AfterTests, BeforeSigning, AfterSigning, BeforeArtefacts, AfterArtefacts, BeforePublish, AfterPublish, BeforeInstall, AfterInstall
Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: TrueWhen set, logs a failed action and lets the pipeline continue.
Type: SwitchParameter
Parameter Sets: Inline, File, ScriptBlock
Aliases: None
Possible values:
Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: TrueWhen set, disables the action while keeping it in configuration.
Type: SwitchParameter
Parameter Sets: Inline, File, ScriptBlock
Aliases: None
Possible values:
Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: TrueEnvironment variable overrides passed to the action process.
Type: Hashtable
Parameter Sets: Inline, File, ScriptBlock
Aliases: None
Possible values:
Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: TruePath to a PowerShell script file. Relative paths resolve from the project root.
Type: String
Parameter Sets: File
Aliases: None
Possible values:
Required: True
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: TrueInline PowerShell script text.
Type: String
Parameter Sets: Inline
Aliases: None
Possible values:
Required: True
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: TrueFriendly action name shown in progress and result output.
Type: String
Parameter Sets: Inline, File, ScriptBlock
Aliases: None
Possible values:
Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: TrueWhen set, prefer Windows PowerShell before pwsh on Windows.
Type: SwitchParameter
Parameter Sets: Inline, File, ScriptBlock
Aliases: None
Possible values:
Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: TrueInline PowerShell script block. The script block text is executed out-of-process.
Type: ScriptBlock
Parameter Sets: ScriptBlock
Aliases: None
Possible values:
Required: True
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: TrueAction timeout in seconds. Defaults to five minutes.
Type: Nullable`1
Parameter Sets: Inline, File, ScriptBlock
Aliases: None
Possible values:
Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: TrueOptional working directory. Relative paths resolve from the project root.
Type: String
Parameter Sets: Inline, File, ScriptBlock
Aliases: None
Possible values:
Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: TrueThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
None
PowerForge.ConfigurationActionSegment
- None