v1.1.1 - Just-in-Time Module Loading & Version Pinning #3
Workflow file for this run
This file contains hidden or 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 | |
| on: | |
| release: | |
| types: [published] | |
| workflow_dispatch: # Allow manual trigger | |
| jobs: | |
| publish: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install required modules | |
| shell: pwsh | |
| run: | | |
| Set-PSRepository -Name PSGallery -InstallationPolicy Trusted | |
| Install-Module -Name Microsoft.Graph.Authentication -Force -AllowClobber | |
| Install-Module -Name Microsoft.Graph.Users -Force -AllowClobber | |
| Install-Module -Name Microsoft.Graph.Identity.DirectoryManagement -Force -AllowClobber | |
| Install-Module -Name Microsoft.Graph.Identity.Governance -Force -AllowClobber | |
| Install-Module -Name Az.Accounts -Force -AllowClobber | |
| - name: Test module manifest | |
| shell: pwsh | |
| run: | | |
| Test-ModuleManifest -Path ./PIMActivation.psd1 | |
| - name: Publish to PSGallery | |
| shell: pwsh | |
| env: | |
| NUGET_API_KEY: ${{ secrets.PSGALLERY_API_KEY }} | |
| run: | | |
| Publish-Module -Path . -NuGetApiKey $env:NUGET_API_KEY -Verbose |