@@ -58,24 +58,18 @@ jobs:
5858 $moduleName = $moduleManifest.BaseName
5959 $artifactPath = "${{ env.buildFolderName }}/"
6060
61- # Build NuGet package (.nupkg) for the PowerShell module
6261 New-Item -ItemType Directory -Path $artifactPath -Force | Out-Null
63- #Publish-Module -Path $moduleManifest.Directory.FullName -NuGetApiKey 'AnyValue' -Repository 'LocalRepo' -Force -SkipAutomaticTags -WhatIf
64- #$nupkgFile = Get-ChildItem -Path "$env:USERPROFILE/.local/share/powershell/Modules" -Filter '*.nupkg' -Recurse | Sort-Object LastWriteTime -Descending | Select-Object -First 1
65- #if ($nupkgFile) {
66- # Copy-Item -Path $nupkgFile.FullName -Destination $artifactPath
67- #}
6862 Copy-Item -Path "$($moduleManifest.Directory.FullName)\*.psm1" -Destination $artifactPath
6963 Copy-Item -Path "$($moduleManifest.FullName)" -Destination $artifactPath
7064 Copy-Item -Path "$($moduleManifest.Directory.FullName)\public" -Destination "$artifactPath\public" -Recurse
7165 Copy-Item -Path "$($moduleManifest.Directory.FullName)\private" -Destination "$artifactPath\private" -Recurse
72- Get-ChildItem -Path "$artifactPath" -Recurse | ForEach-Object {
73- if ($_.PSIsContainer) {
74- Write-Host "Directory: $($_.FullName)"
75- } else {
76- Write-Host "File: $($_.FullName)"
77- }
78- }
66+ # Get-ChildItem -Path "$artifactPath" -Recurse | ForEach-Object {
67+ # if ($_.PSIsContainer) {
68+ # Write-Host "Directory: $($_.FullName)"
69+ # } else {
70+ # Write-Host "File: $($_.FullName)"
71+ # }
72+ # }
7973
8074 - name : Upload Build Artifact
8175 uses : actions/upload-artifact@v4
9892 env :
9993 NUGET_API_KEY : ${{ secrets.PSGALLERY_API_KEY }}
10094 run : |
101- Resolve-Path "."
102- Get-ChildItem -Path "." -Recurse | ForEach-Object {
103- if ($_.PSIsContainer) {
104- Write-Host "Directory: $($_.FullName)"
105- } else {
106- Write-Host "File: $($_.FullName)"
107- }
108- }
109-
110- Publish-Module -Path . -NuGetApiKey $env:NUGET_API_KEY -Repository PSGallery -Force
95+ Publish-Module -Path . -NuGetApiKey $env:NUGET_API_KEY -Repository PSGallery -Force -AllowPrerelease
11196 shell : pwsh
0 commit comments