https://github.com/mod-posh/createpowershellmodule
This action creates a PowerShell module from source files.
https://github.com/mod-posh/createpowershellmodule
github-actions powershell
Last synced: 8 days ago
JSON representation
This action creates a PowerShell module from source files.
- Host: GitHub
- URL: https://github.com/mod-posh/createpowershellmodule
- Owner: mod-posh
- License: gpl-3.0
- Created: 2024-07-17T13:06:42.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-18T18:24:44.000Z (over 1 year ago)
- Last Synced: 2024-07-19T21:37:50.102Z (over 1 year ago)
- Topics: github-actions, powershell
- Language: PowerShell
- Homepage:
- Size: 29.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Create PowerShell Module GitHub Action
This action creates a PowerShell module from source files.
## Inputs
### `ModuleName`
**Required** The name of the PowerShell module.
### `Source`
**Optional** The source directory containing the module (relative to the workspace).
### `Output`
**Optional** TThe output directory for storing the module (relative to the workspace).
### `Imports`
**Required** Comma-separated list of import folders.
### `Debug`
**Optional** Enable debug mode. The default is `false``.
## Example usage
```yaml
name: Build PowerShell Module
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
path: MySuperModule # Custom path for the checkout
- name: Create PowerShell Manifest
uses: your-username/your-repo@v1 # Replace with your repository details for the createpowershellmanifest action
with:
ModuleName: 'your-module'
Source: 'MySuperModule' # Use the custom path here
Debug: 'true'
- name: Create PowerShell Module
uses: your-username/your-repo@v1 # Replace with your repository details for the createpowershellmodule action
with:
ModuleName: 'your-module'
Source: 'MySuperModule' # Use the custom path here
Imports: 'folder1,folder2'
Debug: 'true'
- name: Upload PowerShell Module
uses: actions/upload-artifact@v2
with:
name: your-module-output
path: ${{ github.workspace }}/output