Skip to content
Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

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

name: Build PowerShell Moduleon:
push:
branches:
- mainpull_request:
branches:
- mainjobs:
build:
runs-on: windows-lateststeps:
- name: Checkout repositoryuses: actions/checkout@v4with:
path: 'Repo'
- name: Create PowerShell Manifestuses: mod-posh/CreatePowerShellManifest@v0.0.1.0with:
ModuleName: 'SpnLibrary'Source: 'Repo'Imports: 'public'Debug: 'true'
- name: Create PowerShell Moduleuses: mod-posh/CreatePowerShellModule@v0.0.1.0with:
ModuleName: 'SpnLibrary'Source: 'Repo'Imports: 'public'Debug: 'true'
- name: Test PowerShell Moduleuses: mod-posh/TestPowerShellModule@v0.0.1.0with:
ModuleName: 'SpnLibrary'Source: 'Repo'Debug: 'true'
- name: Publish PowerShell Moduleuses: mod-posh/PublishPowerShellModule@v0.0.1.0with:
ModuleName: 'SpnLibrary'Source: 'Repo'ApiKey: ${{ secrets.APIKEY }}Debug: 'true'

About

The "Publish PowerShell Module" GitHub Action is designed to automate the process of publishing a PowerShell module to the PowerShell Gallery.

Topics

Resources

Code of conduct

Contributing

Stars

1 star

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages