Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issues
What does this solve?
Linux runners process the
BuildNuspecForPsd1.ps1
file ever so slightly different from Windows or macOS systems. When building a nuspec file in linux, the nuspec file contains a flattened set of functions. In other words functions that are split betweenpublic
andprivate
directories were flattened into their sub directories likeusers
andsystems
.Some public functions reference these private functions by relative paths and when the nupkg file contains flattened function directories, those functions were inaccessible.
This release addresses the issue of building the nuspec file specifically for the
ubuntu-latest
runners in Github Actions. There is a new job introduced to the release step that will validate that the "Public" and "Private" directory exist within the nupkg file. The newly create nupkg file is uploaded as an artifact.This step occurs before the manual approval job. SAs should be able to validate the nupkg file is correct before approving.
After manual approval, the nupkg artifact is downloaded, and published to PSGallery.
Is there anything particularly tricky?
How should this be tested?
I've built a new workflow to test this functionality, please reference the
build-pack-pwsh-ci.yml
file in this PR along with this run of GHA which shows the tests for the nupkg file, the artifact upload and download and adding the nuget sources before publish.Screenshots