Skip to content

A GitHub Action to publish a PowerShell module or script to GitHub Packages, a NuGet repository, or the PowerShell Gallery.

License

Notifications You must be signed in to change notification settings

natescherer/publish-powershell-action

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

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Publish PowerShell GitHub Action

PowerShell on Windows PowerShell on Linux PowerShell on macOS

All Contributors

A GitHub Action to publish a PowerShell module or script to GitHub Packages, a NuGet repository, or the PowerShell Gallery.

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

Usage

    steps:
      - name: Publish PowerShell Module
        uses: natescherer/publish-powershell-action@v1
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          target: packages
          path: src
    steps:
      - name: Publish PowerShell Module
        uses: natescherer/publish-powershell-action@v1
        with:
          token: ${{ secrets.NUGET_TOKEN }}
          target: nuget
          path: src
    steps:
      - name: Publish PowerShell Module
        uses: natescherer/publish-powershell-action@v1
        with:
          token: ${{ secrets.GALLERY_API_KEY }}
          target: gallery
          path: src

Inputs

Name Required Default Description
token true Token to authenticate.
target true Set to packages for GitHub Packages, gallery for the PowerShell Gallery, or nuget for a NuGet repository.
path true Path to publish 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.
nugetUrl false Url to use with NuGet target. Should be a NuGet v2 or v3 endpoint.

Outputs

Name Description

Contributors

Nate Scherer
Nate Scherer

💻 📖 🚇
Gal Villaret
Gal Villaret

💻

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.

Acknowledgements

Hosted By: Cloudsmith

Package repository hosting is graciously provided by Cloudsmith.

About

A GitHub Action to publish a PowerShell module or script to GitHub Packages, a NuGet repository, or the PowerShell Gallery.

Resources

License

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •