Publish Module to PSGallery #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Module to PSGallery | |
on: | |
release: | |
types: [published] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up PowerShell | |
uses: actions/setup-powershell@v2 | |
with: | |
powershell-version: '7.4' | |
- name: Install PowerShellGet | |
run: | | |
Install-Module -Name PowerShellGet -Force -Scope CurrentUser | |
Import-Module -Name PowerShellGet | |
- name: Publish Module | |
run: | | |
$PSGalleryApiKey = "${{ secrets.PSGALLERY_API_KEY }}" | |
Publish-Module -Path ./ -NuGetApiKey $PSGalleryApiKey | |
shell: pwsh |