/update-powershell-metadata-action

A GitHub Action to update metadata in PowerShell modules and scripts.

Primary LanguagePowerShellMIT LicenseMIT

Update PowerShell Metadata GitHub Action

PowerShell on Windows PowerShell on Linux PowerShell on macOS

All Contributors

A GitHub Action to update metadata in PowerShell modules and scripts.

This action is designed to let you quickly update the release-related metadata in a manifest or script file as part of a release workflow.

It is tested and runs on windows-latest, ubuntu-latest, and macos-latest.

Usage

    steps:
      - name: Update Metadata
        uses: natescherer/update-powershell-metadata-action@v2
        with:
          path: src\MyModule.psd1
          version: 1.2.3-alpha1
          copyright: (c) YYYY Omni Consumer Products. All rights reserved.

Inputs

This Action defines the following formal inputs.

Name Required Default Description
path true Path to relative to the root of the project. Can either be a .psd1 file, a .ps1 file, or a directory. If a directory, the action will search for a .psd1 file in the root. If none are found, it will then search for a .ps1 file in the root.
version false A SemVer 1.0.0 compatible version number (must be SermVer 1.0.0 due to PowerShellGet's limitations). Supports prerelease versions such as 1.0.0-alpha.
copyright false Copyright information. Include YYYY and it will automatically be replaced by the current year.
description false Description of the module/script.
releaseNotes false Release notes for the module/script.
functionsToExport false A comma-separated list of functions that should be exported from a module. Does not apply to scripts.
functionsToExportPath false An alternate input instead of functionsToExport that will scan a directory for .ps1 files and export functions matching those file names. Useful if your module design uses dot-sourcing.

Outputs

This Action defines the following formal outputs.

Name Description
path The fully-qualified path of the file that was modified by this action.

Contributors

Nate Scherer
Nate Scherer

💻 📖 🚇

This project follows the all-contributors specification. Contributions of any kind are welcome!

License

This project is licensed under The MIT License - see LICENSE for details.