Fix autoloader; split commands in Pester step #5
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 PowerShell Gallery | |
| on: | |
| push: | |
| tags: ['v*'] | |
| jobs: | |
| publish: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install PSResourceGet | |
| shell: pwsh | |
| run: Install-Module Microsoft.PowerShell.PSResourceGet -Force -Scope CurrentUser | |
| - name: Run Pester tests | |
| shell: pwsh | |
| run: | | |
| Import-Module "$PWD\NicolasAigner.SystemToolkit.psd1" -Force | |
| Invoke-Pester -CI | |
| - name: Publish module | |
| shell: pwsh | |
| env: | |
| PSGALLERY_APIKEY: ${{ secrets.PSGALLERY_APIKEY }} | |
| run: > | |
| Publish-PSResource -Path . ` | |
| -Repository PSGallery ` | |
| -ApiKey $env:PSGALLERY_APIKEY |