PsBuildTasks

Reusable sources for build, test, release automation of PowerShell modules, written in DotNet/C# or PowerShell.

View the Project on GitHub abbgrade/PsBuildTasks

GitHub Actions workflows

It provides the following workflows:

It depends on a convention for branch names. These are based on the default settings of the git-flow git extension.

Usage

Build Validation Workflow

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"
}

Pre-Release Workflow

  1. Execute the following snippet to initialize or update the pre-release workflow:
task UpdatePreReleaseWorkflow {
    Invoke-WebRequest `
        -Uri 'https://raw.githubusercontent.com/abbgrade/PsBuildTasks/main/GitHub/pre-release-windows.yml' `
        -OutFile "$PSScriptRoot\.github\workflows\pre-release.yml"
}
  1. Update the module-name input in the workflow.
  2. Configure the repository secret PS_GALLERY_KEY with a PowerShell Gallery API key.

Release Workflow

  1. Execute the following snippet to initialize or update the release workflow:
task UpdateReleaseWorkflow {
    Invoke-WebRequest `
        -Uri 'https://raw.githubusercontent.com/abbgrade/PsBuildTasks/main/GitHub/release-windows.yml' `
        -OutFile "$PSScriptRoot\.github\workflows\release.yml"
}
  1. Update the module-name input in the workflow.
  2. Configure the repository secret PS_GALLERY_KEY with a PowerShell Gallery API key.