Skip to content

v1.1.1 - Just-in-Time Module Loading & Version Pinning #3

v1.1.1 - Just-in-Time Module Loading & Version Pinning

v1.1.1 - Just-in-Time Module Loading & Version Pinning #3

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