Skip to content

Commit

Permalink
Updates workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffodonnell committed Mar 23, 2024
1 parent 820071f commit 6d812d6
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ jobs:
with:
name: ${{ env.artifactName }}
path: ${{ runner.temp }}/${{ env.moduleName }}
- name: Publish module
- name: Publish module to GitHub
shell: pwsh
run: |-
$user = "${{ github.actor }}"
Expand Down Expand Up @@ -205,4 +205,17 @@ jobs:
## Test
Get-PackageSource
Publish-Module -Path $modulePath -Repository $repositoryName -NuGetApiKey "${{ github.token }}"
Publish-Module -Path $modulePath -Repository $repositoryName -NuGetApiKey "${{ github.token }}"
- name: Publish module to PowerShell Gallery
if: ${{ env.prerelease == '' }}
shell: pwsh
run: |-
$dropPath = "${{ runner.temp }}"
$moduleName = "${{ env.moduleName }}"
$modulePath = [System.IO.Path]::GetFullPath((Join-Path -Path $dropPath -ChildPath $moduleName))
## Force TLS1.2
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
## Publish to PSGallery
Publish-Module -Path "$modulePath" -Repository "PSGallery" -NuGetApiKey "${{ secrets.PSGALLERY_API_KEY }}"

0 comments on commit 6d812d6

Please sign in to comment.