Skip to content

Commit c5a9ecf

Browse files
committed
Revert back to just using Publish-Module to reduce dependencies/complexity. Will fix the dot-files issue another way
1 parent 499f004 commit c5a9ecf

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

.github/workflows/build-test-and-deploy-powershell-module.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,8 @@ jobs:
4747
Write-Output "Testing the prerelease module manifest file '$moduleManifestFilePath' to ensure it is still valid."
4848
Test-ModuleManifest -Path $moduleManifestFilePath
4949
50-
# Publish-Module has a bug where it does not include dot-files in the module when publishing, so must use Publish-PSResource instead.
51-
Write-Output "Installing the PSResourceGet module to use to publish the module."
52-
Install-Module -Name Microsoft.PowerShell.PSResourceGet -Scope CurrentUser -Repository PSGallery -Force
53-
5450
Write-Output "Publishing the prerelease version of the module."
55-
Publish-PSResource -Path $moduleDirectoryPath -ApiKey '${{ secrets.POWERSHELL_GALLERY_API_KEY }}' -Repository PSGallery -Verbose
51+
Publish-Module -Path $moduleDirectoryPath -NuGetApiKey '${{ secrets.POWERSHELL_GALLERY_API_KEY }}' -Verbose
5652
5753
- name: Wait a short while for the module to be available on the PowerShell Gallery before continuing
5854
shell: pwsh
@@ -159,13 +155,7 @@ jobs:
159155
run: |
160156
[string] $moduleName = '${{ needs.run-build-and-test.outputs.powerShellModuleName }}'
161157
[string] $moduleDirectoryPath = "$Env:artifactsDirectoryPath/$moduleName"
162-
163-
# Publish-Module has a bug where it does not include dot-files in the module when publishing, so must use Publish-PSResource instead.
164-
Write-Output "Installing the PSResourceGet module to use to publish the module."
165-
Install-Module -Name Microsoft.PowerShell.PSResourceGet -Scope CurrentUser -Repository PSGallery -Force
166-
167-
Write-Output "Publishing the prerelease version of the module."
168-
Publish-PSResource -Path $moduleDirectoryPath -ApiKey '${{ secrets.POWERSHELL_GALLERY_API_KEY }}' -Repository PSGallery -Verbose
158+
Publish-Module -Path $moduleDirectoryPath -NuGetApiKey '${{ secrets.POWERSHELL_GALLERY_API_KEY }}' -Verbose
169159
170160
- name: Wait a short while for the module to be available on the PowerShell Gallery before continuing
171161
shell: pwsh

0 commit comments

Comments
 (0)