OCram85
OCram85

Reputation: 889

How to publish a Powershell Module to PowershellGallery with Appveyor?

Is there a way to add a custom powershell script into the appveyor build script to publish a module to powershellgallery? - The module source would be in the github repo.

If not, maybe it's possible within the appveyor web config itself?

Upvotes: 2

Views: 221

Answers (1)

Ilya Finkelsheyn
Ilya Finkelsheyn

Reputation: 2881

I believe you can create script based Publish-Module command and insert it into right stage of build pipeline. For example if you decide to publish after test stage, it will look like this in YAML: after_test: - ps: Publish-Module -Name "MyDscModule" -NuGetApiKey "11e4b435-6cb4-4bf7-8611-5162ed75eb73"

Or in UI you need to go to Settings > Test > Auto > After tests script > PS and enter publish script.

Upvotes: 3

Related Questions