{"id":13598478,"url":"https://github.com/PSModule/Process-PSModule","last_synced_at":"2025-04-10T09:31:18.460Z","repository":{"id":200844208,"uuid":"706356420","full_name":"PSModule/Process-PSModule","owner":"PSModule","description":"Process a module from source code to published module.","archived":false,"fork":false,"pushed_at":"2025-03-30T10:19:13.000Z","size":466,"stargazers_count":7,"open_issues_count":76,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-30T11:24:12.720Z","etag":null,"topics":["powershell","powershell-module","workflow"],"latest_commit_sha":null,"homepage":"https://psmodule.io","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PSModule.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["MariusStorhaug"],"patreon":"MariusStorhaug","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":["https://www.paypal.me/MariusStorhaug"]}},"created_at":"2023-10-17T19:35:39.000Z","updated_at":"2025-02-14T09:16:22.000Z","dependencies_parsed_at":"2024-06-03T15:51:48.301Z","dependency_job_id":"8ffd429d-1fd6-46f2-9575-9c09fc82143b","html_url":"https://github.com/PSModule/Process-PSModule","commit_stats":null,"previous_names":["psmodule/actions","psmodule/process-psmodule"],"tags_count":76,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PSModule%2FProcess-PSModule","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PSModule%2FProcess-PSModule/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PSModule%2FProcess-PSModule/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PSModule%2FProcess-PSModule/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PSModule","download_url":"https://codeload.github.com/PSModule/Process-PSModule/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248191691,"owners_count":21062553,"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":["powershell","powershell-module","workflow"],"created_at":"2024-08-01T17:00:52.971Z","updated_at":"2025-04-10T09:31:13.443Z","avatar_url":"https://github.com/PSModule.png","language":"PowerShell","funding_links":["https://github.com/sponsors/MariusStorhaug","https://patreon.com/MariusStorhaug","https://www.paypal.me/MariusStorhaug"],"categories":["PowerShell"],"sub_categories":[],"readme":"# Process-PSModule\n\nA workflow for the PSModule process, stitching together the `Initialize`, `Build`, `Test`, and `Publish` actions to create a complete\nCI/CD pipeline for PowerShell modules. The workflow is used by all PowerShell modules in the PSModule organization.\n\n## Specifications and practices\n\nProcess-PSModule follows:\n\n- [Test-Driven Development](https://testdriven.io/test-driven-development/) using [Pester](https://pester.dev) and [PSScriptAnalyzer](https://learn.microsoft.com/en-us/powershell/utility-modules/psscriptanalyzer/overview?view=ps-modules)\n- [GitHub Flow specifications](https://docs.github.com/en/get-started/using-github/github-flow)\n- [SemVer 2.0.0 specifications](https://semver.org)\n- [Continiuous Delivery practices](https://en.wikipedia.org/wiki/Continuous_delivery)\n\n## How it works\n\nThe workflow is designed to be trigger on pull requests to the repository's default branch.\nWhen a pull request is opened, closed, reopened, synchronized (push), or labeled, the workflow will run.\nDepending on the labels in the pull requests, the workflow will result in different outcomes.\n\n![Process diagram](./media/Process-PSModule.png)\n\n- [Test-PSModule](https://github.com/PSModule/Test-PSModule/) - Tests the source code using PSScriptAnalyzer, PSModule source code tests suites. This runs on 4 different environments to check compatibility.\n  - PowerShell 7.x on Windows, Ubuntu and macOS.\n  - Windows PowerShell 5.1 on Windows.\n- [Build-PSModule](https://github.com/PSModule/Build-PSModule/) - Compiles the repository into an efficient PowerShell module.\n- [Test-PSModule](https://github.com/PSModule/Test-PSModule/) - Tests the compiled module using PSScriptAnalyzer, PSModule module tests and custom module tests from the module repository. This runs on 4 different environments to check compatibility.\n  - PowerShell 7.x on Windows, Ubuntu and macOS.\n  - Windows PowerShell 5.1 on Windows.\n- [Publish-PSModule](https://github.com/PSModule/Publish-PSModule/) - Publishes the module to the PowerShell Gallery, docs to GitHub Pages, and creates a release on the GitHub repository.\n\nTo use the workflow, create a new file in the `.github/workflows` directory of the module repository and add the following content.\n\u003cdetails\u003e\n\u003csummary\u003eWorkflow suggestion\u003c/summary\u003e\n\n```yaml\nname: Process-PSModule\n\non:\n  pull_request:\n    branches:\n      - main\n    types:\n      - closed\n      - opened\n      - reopened\n      - synchronize\n      - labeled\n\nconcurrency:\n  group: ${{ github.workflow }}-${{ github.ref }}\n  cancel-in-progress: true\n\npermissions:\n  contents: write\n  pull-requests: write\n\njobs:\n  Process-PSModule:\n    uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@v2\n    secrets: inherit\n\n```\n\u003c/details\u003e\n\n## Usage\n\n### Inputs\n\n| Name | Type | Description | Required | Default |\n| ---- | ---- | ----------- | -------- | ------- |\n| `Name` | `string` | The name of the module to process. This defaults to the repository name if nothing is specified. | `false` | N/A |\n| `Path` | `string` | The path to the source code of the module. | `false` | `src` |\n| `ModulesOutputPath` | `string` | The path to the output directory for the modules. | `false` | `outputs/modules` |\n| `DocsOutputPath` | `string` | The path to the output directory for the documentation. | `false` | `outputs/docs` |\n| `PublishDocs` | `boolean` | Whether to publish the documentation using MkDocs and GitHub Pages. | `false` | `true` |\n| `SiteOutputPath` | `string` | The path to the output directory for the site. | `false` | `outputs/site` |\n| `SkipTests` | `string` | Defines what types of tests to skip. Allowed values are 'All', 'SourceCode', 'Module', 'None', 'macOS', 'Windows', 'Linux'. | false | `None` |\n| `TestProcess` | `boolean` | Whether to test the process. | false | `false` |\n| `Version` | `string` | The version of the 'GitHub' module to use. Defaults to latest version. | false | N/A |\n| `Prerelease` | `boolean` | Whether to use a prerelease version of the 'GitHub' module. | false | `false` |\n\n### Secrets\n\nThe following secrets are **required** for the workflow to run:\n\n| Name | Location | Description | Default |\n| ---- | -------- | ----------- | ------- |\n| `GITHUB_TOKEN` | `github` context | The token used to authenticate with GitHub. | `${{ secrets.GITHUB_TOKEN }}` |\n| `APIKey` | GitHub secrets | The API key for the PowerShell Gallery. | N/A |\n\n## Permissions\n\nThe action requires the following permissions:\n\nIf running the action in a restrictive mode, the following permissions needs to be granted to the action:\n\n```yaml\npermissions:\n  contents: write      # Create releases\n  pull-requests: write # Create comments on the PRs\n  statuses: write      # Update the status of the PRs from the linter\n```\n\n### Publishing to GitHub Pages\n\nTo publish the documentation to GitHub Pages, the action requires the following permissions:\n\n```yaml\npermissions:\n  pages: write    # Deploy to Pages\n  id-token: write # Verify the deployment originates from an appropriate source\n```\n\nFor more info see [Deploy GitHub Pages site](https://github.com/marketplace/actions/deploy-github-pages-site).\n\n## Compatibility\n\nThe action is compatible with the following configurations:\n\n| OS | Shell |\n| --- | --- |\n| windows-latest | pwsh |\n| macos-latest | pwsh |\n| ubuntu-latest | pwsh |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPSModule%2FProcess-PSModule","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPSModule%2FProcess-PSModule","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPSModule%2FProcess-PSModule/lists"}