https://github.com/mod-posh/publishpowershellmodule
The "Publish PowerShell Module" GitHub Action is designed to automate the process of publishing a PowerShell module to the PowerShell Gallery.
https://github.com/mod-posh/publishpowershellmodule
github-actions powershell
Last synced: 8 days ago
JSON representation
The "Publish PowerShell Module" GitHub Action is designed to automate the process of publishing a PowerShell module to the PowerShell Gallery.
- Host: GitHub
- URL: https://github.com/mod-posh/publishpowershellmodule
- Owner: mod-posh
- License: gpl-3.0
- Created: 2024-07-18T19:23:30.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-18T20:17:37.000Z (over 1 year ago)
- Last Synced: 2024-07-19T03:55:41.593Z (over 1 year ago)
- Topics: github-actions, powershell
- Language: PowerShell
- Homepage:
- Size: 23.4 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
# Publish PowerShell Module GitHub Action
This action Publishes a PowerShell module.
## 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).
### `ApiKey`
**Required** The PowerShell Gallery API Key.
### `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@v4
with:
path: 'Repo'
- name: Create PowerShell Manifest
uses: mod-posh/CreatePowerShellManifest@v0.0.1.0
with:
ModuleName: 'SpnLibrary'
Source: 'Repo'
Imports: 'public'
Debug: 'true'
- name: Create PowerShell Module
uses: mod-posh/CreatePowerShellModule@v0.0.1.0
with:
ModuleName: 'SpnLibrary'
Source: 'Repo'
Imports: 'public'
Debug: 'true'
- name: Test PowerShell Module
uses: mod-posh/TestPowerShellModule@v0.0.1.0
with:
ModuleName: 'SpnLibrary'
Source: 'Repo'
Debug: 'true'
- name: Publish PowerShell Module
uses: mod-posh/PublishPowerShellModule@v0.0.1.0
with:
ModuleName: 'SpnLibrary'
Source: 'Repo'
ApiKey: ${{ secrets.APIKEY }}
Debug: 'true'
```