Publish to PowerShell Gallery #21
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 to PowerShell Gallery | |
# Controls when the workflow will run | |
on: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
publish-to-gallery: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build and publish | |
env: | |
NUGET_KEY: ${{ secrets.PSGALLERYAPI }} | |
shell: pwsh | |
run: | | |
Set-PSRepository psgallery -InstallationPolicy trusted | |
Install-Module ImportExcel, ExchangeOnlineManagement, Microsoft.Graph.Users, Microsoft.Graph.Groups, Microsoft.Graph.Identity.DirectoryManagement, Microsoft.Graph.Users.Actions, PSFramework, PnP.PowerShell, Microsoft.Identity.Client -confirm:$false -force | |
Publish-Module -Path ./ -NuGetApiKey $env:NUGET_KEY -Verbose |