Reusable sources for build, test, release automation of PowerShell modules, written in DotNet/C# or PowerShell.
It provides the following workflows:
Build task, runs Pester as matrix and creates a test report.It depends on a convention for branch names. These are based on the default settings of the git-flow git extension.
InstallBuildDependencies task which installs modules, required to build the module.Build that builds the module into the publish directory.InstallTestDependencies task which installs modules, required to test the module.test directory.InstallReleaseDependencies task which installs modules, required to import/publish the module.Add the following task to your .build.ps1 file to create/update your workflow.
task UpdateValidationWorkflow {
Invoke-WebRequest `
-Uri 'https://raw.githubusercontent.com/abbgrade/PsBuildTasks/main/GitHub/build-validation-matrix.yml' `
-OutFile "$PSScriptRoot\.github\workflows\build-validation.yml"
}
task UpdatePreReleaseWorkflow {
Invoke-WebRequest `
-Uri 'https://raw.githubusercontent.com/abbgrade/PsBuildTasks/main/GitHub/pre-release-windows.yml' `
-OutFile "$PSScriptRoot\.github\workflows\pre-release.yml"
}
module-name input in the workflow.PS_GALLERY_KEY with a PowerShell Gallery API key.task UpdateReleaseWorkflow {
Invoke-WebRequest `
-Uri 'https://raw.githubusercontent.com/abbgrade/PsBuildTasks/main/GitHub/release-windows.yml' `
-OutFile "$PSScriptRoot\.github\workflows\release.yml"
}
module-name input in the workflow.PS_GALLERY_KEY with a PowerShell Gallery API key.