{"id":14064116,"url":"https://github.com/abbgrade/PsBuildTasks","last_synced_at":"2025-07-29T17:32:11.060Z","repository":{"id":44344310,"uuid":"462014235","full_name":"abbgrade/PsBuildTasks","owner":"abbgrade","description":"Reusable sources for build, test, release automation of PowerShell modules, written in DotNet/C# or PowerShell.","archived":false,"fork":false,"pushed_at":"2023-06-08T17:58:05.000Z","size":93,"stargazers_count":1,"open_issues_count":6,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-05-23T00:31:11.720Z","etag":null,"topics":["github-actions","powershell","vscode"],"latest_commit_sha":null,"homepage":"https://abbgrade.github.io/PsBuildTasks/","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abbgrade.png","metadata":{"files":{"readme":"Readme.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["abbgrade"]}},"created_at":"2022-02-21T20:05:06.000Z","updated_at":"2024-08-13T07:06:15.642Z","dependencies_parsed_at":"2024-08-13T07:18:43.455Z","dependency_job_id":null,"html_url":"https://github.com/abbgrade/PsBuildTasks","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abbgrade%2FPsBuildTasks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abbgrade%2FPsBuildTasks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abbgrade%2FPsBuildTasks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abbgrade%2FPsBuildTasks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abbgrade","download_url":"https://codeload.github.com/abbgrade/PsBuildTasks/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228032924,"owners_count":17858917,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github-actions","powershell","vscode"],"created_at":"2024-08-13T07:03:41.203Z","updated_at":"2024-12-04T02:31:12.455Z","avatar_url":"https://github.com/abbgrade.png","language":"PowerShell","readme":"# Readme\r\n\r\nPsBuildTasks provides reusable sources for build, test, release automation of PowerShell modules, written in DotNet/C# or PowerShell.\r\n\r\nThis includes:\r\n\r\n- [InvokeBuild](https://github.com/nightroman/Invoke-Build) tasks. [Details](./tasks/Readme.md).\r\n- [GitHub Actions](https://docs.github.com/en/actions) workflows. [Details](./GitHub/Readme.md).\r\n- [VsCode Tasks](https://code.visualstudio.com/docs/editor/tasks) workflows. [Details](./VsCode/Readme.md).\r\n- A PowerShell module for installation and updates. See [the command reference](./docs/) for descriptions and examples.\r\n\r\nFor details, visit the [GitHub Pages](https://abbgrade.github.io/PsBuildTasks/).\r\n\r\n## Getting Started\r\n\r\nThere is a PowerShell module to manage PsBuildTasks and helps with it's installation.\r\nGet it with `Install-Module -Name PsBuildTasks` from from [PsGallery](https://www.powershellgallery.com/packages/PsBuildTasks).\r\nThe next step depends on your project.\r\n\r\n1. If your project is written in PowerShell or DotNet/C#.\r\n2. If your project supports only Windows or is cross platform and requires matrix tests on Windows and Linux.\r\n\r\nThere are container tasks that update multiple features of PsBuildTasks\r\n\r\n### PowerShell Matrix\r\n\r\nGo to the project root directory and execute the following script.\r\nMake sure to save your existing code in git, since files may be overwritten.\r\n\r\n```powershell\r\nImport-Module -Name PsBuildTasks\r\nInstall-PsBuildTask -Path . -Task PowerShell-Matrix\r\n$ModuleName = ( Get-Location | Get-Item ).Name\r\n\r\nInvoke-Build -File .\\tasks\\PsBuild.Tasks.ps1 -Task UpdatePsBuildTasks\r\n\r\nSet-Content -Path .build.ps1 -Value @\"\r\n[CmdletBinding()]\r\nparam (\r\n    [Parameter()]\r\n    [int] $BuildNumber\r\n)\r\n\r\n`$ModuleName = '$ModuleName'\r\n\r\n. `$PSScriptRoot/tasks/Build.Tasks.ps1\r\n. `$PSScriptRoot/tasks/PsBuild.Tasks.ps1\r\n\r\ntask InstallModuleDependencies -Jobs {}\r\ntask InstallBuildDependencies -Jobs InstallModuleDependencies, {\r\n    Install-Module platyPs\r\n}\r\ntask InstallTestDependencies -Jobs InstallModuleDependencies, {}\r\ntask InstallReleaseDependencies -Jobs InstallModuleDependencies, {}\r\n\"@\r\n```\r\n\r\nIn case you start a module from scratch, create a module structure like this.\r\n\r\n```powershell\r\nNew-Item src -ItemType Directory\r\nNew-ModuleManifest -Path src/$ModuleName.psd1 -RootModule \"$ModuleName.psm1\"\r\n$local:manifest = Get-Content -Path src/$ModuleName.psd1 | ForEach-Object {\r\n    $_ -Replace 'FunctionsToExport', '# FunctionsToExport' -Replace 'CmdletsToExport', '# CmdletsToExport' -Replace 'VariablesToExport', '# VariablesToExport' -Replace 'AliasesToExport', '# AliasesToExport'\r\n}\r\n$local:manifest | Set-Content -Path src/$ModuleName.psd1\r\nNew-Item src/Internal -ItemType Directory\r\nNew-Item src/Public -ItemType Directory\r\nNew-Item test -ItemType Directory\r\n```\r\n\r\n## Update development version\r\n\r\nYou can update PsBuildTasks to:\r\n\r\nthe latest stable version using:\r\n\r\n```powershell\r\nInvoke-Build -File .\\tasks\\PsBuild.Tasks.ps1 -Task UpdatePsBuildTasksTasks; Invoke-Build  -File .\\tasks\\PsBuild.Tasks.ps1 -Task UpdatePsBuildTasks\r\n```\r\n\r\na branch of choice using:\r\n\r\n```powershell\r\n$PsBuildTaskBranch = 'develop'; Invoke-Build -File .\\tasks\\PsBuild.Tasks.ps1 -Task UpdatePsBuildTasksTasks; Invoke-Build  -File .\\tasks\\PsBuild.Tasks.ps1 -Task UpdatePsBuildTasks\r\n```\r\n\r\n## Changelog\r\n\r\nSee the [changelog](./CHANGELOG.md) file.\r\n","funding_links":["https://github.com/sponsors/abbgrade"],"categories":["PowerShell"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabbgrade%2FPsBuildTasks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabbgrade%2FPsBuildTasks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabbgrade%2FPsBuildTasks/lists"}