ModuleForge

add-mfGithubScaffold

SYNOPSIS

Initialises a `.GitHub` scaffold in a PowerShell module, including GH Actions workflows for pester testing and build and release

SYNTAX

add-mfGithubScaffold [[-modulePath] <String>] [[-configFile] <String>] [[-githubFolder] <String>] [-force]
 [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

This function will create a ‘.github’ folder in the moduleforge root (if one does not exist). It will create 2 github actions workflows, 1 for Pester testing, 1 for buildAndRelease It will create 1 Pull Request template.

The buildAndRelease template will use Git Tags to mark versions. If you stick with this template you should refrain from using tags for other purposes.

The purpose of these workflows and templates is to get you started, creating a quick and easy workflow scaffold. Please feel free to change the workflows and template to your own needs and preferences.

EXAMPLES

EXAMPLE 1

Add-mfGithubScaffold

DESCRIPTION

Copies the `.GitHub` folder from the module’s `resource` directory to the current module, skipping existing files.

OUTPUT

Should have a .github folder, with workflows and a PR template

EXAMPLE 2

Add-mfGithubScaffold -Force

DESCRIPTION

Copies the `.GitHub` scaffold and overwrites existing files in `.github` directory

OUTPUT

Should have a .github folder, with workflows and a PR template

PARAMETERS

-modulePath

Root path of the module. Uses the current working directory by default. Aliased path, but use modulePath as paramname to avoid confusion

Type: String
Parameter Sets: (All)
Aliases: path

Required: False
Position: 1
Default value: $(get-location).path
Accept pipeline input: False
Accept wildcard characters: False

-configFile

Module Config reference

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: ModuleForgeConfig.xml
Accept pipeline input: False
Accept wildcard characters: False

-githubFolder

githubFolder

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: .github
Accept pipeline input: False
Accept wildcard characters: False

-force

Should we overwrite if files exist?

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-ProgressAction

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

Author: Adrian Andersson