Skip to content

Commit 14b1d2e

Browse files
committed
Update workflow
1 parent 79a0926 commit 14b1d2e

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

.github/workflows/publish-psg-module.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
types:
55
- "published"
66
workflow_dispatch:
7+
defaults:
8+
run:
9+
shell: "pwsh"
710
jobs:
811
publish-psg-module:
912
name: "Publish - PowerShell Gallery - Module"
@@ -16,25 +19,19 @@ jobs:
1619
run: |
1720
Write-Host -Object "::set-output name=installation-policy::$((Get-PSRepository -Name 'PSGallery').InstallationPolicy)"
1821
Set-PSRepository -Name 'PSGallery' -InstallationPolicy 'Trusted' -Verbose
19-
shell: "pwsh"
2022
- name: "Setup PowerShellGet"
2123
run: |
2224
Install-Module -Name 'PowerShellGet' -MinimumVersion '2.2.5' -Scope 'AllUsers' -AcceptLicense -Verbose
23-
shell: "pwsh"
2425
- name: "Update PowerShell Modules"
2526
run: |
2627
Update-Module -Scope 'AllUsers' -AcceptLicense -Verbose
27-
shell: "pwsh"
2828
- name: "Test Publish"
2929
run: |
3030
Publish-Module -Path '.\hugoalh.GitHubActionsToolkit\' -NugetAPIKey 'GUID' -WhatIf -Verbose
31-
shell: "pwsh"
3231
- name: "Publish"
3332
run: |
3433
Publish-Module -Path '.\hugoalh.GitHubActionsToolkit\' -NugetAPIKey '${{secrets.POWERSHELLGALLERY_TOKEN}}' -Verbose
35-
shell: "pwsh"
3634
- name: "Revert Modify PowerShell Repository"
3735
if: "${{steps.modify-powershell-repository.outcome == 'success' && always()}}"
3836
run: |
3937
Set-PSRepository -Name 'PSGallery' -InstallationPolicy '${{steps.modify-powershell-repository.outputs.installation-policy}}'
40-
shell: "pwsh"

0 commit comments

Comments
 (0)