File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 4
4
types :
5
5
- " published"
6
6
workflow_dispatch :
7
+ defaults :
8
+ run :
9
+ shell : " pwsh"
7
10
jobs :
8
11
publish-psg-module :
9
12
name : " Publish - PowerShell Gallery - Module"
@@ -16,25 +19,19 @@ jobs:
16
19
run : |
17
20
Write-Host -Object "::set-output name=installation-policy::$((Get-PSRepository -Name 'PSGallery').InstallationPolicy)"
18
21
Set-PSRepository -Name 'PSGallery' -InstallationPolicy 'Trusted' -Verbose
19
- shell : " pwsh"
20
22
- name : " Setup PowerShellGet"
21
23
run : |
22
24
Install-Module -Name 'PowerShellGet' -MinimumVersion '2.2.5' -Scope 'AllUsers' -AcceptLicense -Verbose
23
- shell : " pwsh"
24
25
- name : " Update PowerShell Modules"
25
26
run : |
26
27
Update-Module -Scope 'AllUsers' -AcceptLicense -Verbose
27
- shell : " pwsh"
28
28
- name : " Test Publish"
29
29
run : |
30
30
Publish-Module -Path '.\hugoalh.GitHubActionsToolkit\' -NugetAPIKey 'GUID' -WhatIf -Verbose
31
- shell : " pwsh"
32
31
- name : " Publish"
33
32
run : |
34
33
Publish-Module -Path '.\hugoalh.GitHubActionsToolkit\' -NugetAPIKey '${{secrets.POWERSHELLGALLERY_TOKEN}}' -Verbose
35
- shell : " pwsh"
36
34
- name : " Revert Modify PowerShell Repository"
37
35
if : " ${{steps.modify-powershell-repository.outcome == 'success' && always()}}"
38
36
run : |
39
37
Set-PSRepository -Name 'PSGallery' -InstallationPolicy '${{steps.modify-powershell-repository.outputs.installation-policy}}'
40
- shell : " pwsh"
You can’t perform that action at this time.
0 commit comments