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
.
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
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. |
Name | Description |
---|---|
Nate Scherer 💻 📖 🚇 |
Gal Villaret 💻 |
This project follows the all-contributors specification. Contributions of any kind are welcome!
This project is licensed under The MIT License - see LICENSE for details.
Package repository hosting is graciously provided by Cloudsmith.