Skip to content

Commit ccf0370

Browse files
committed
Update workflow
1 parent 2601b03 commit ccf0370

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

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

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,17 @@ jobs:
1515
- name: "Checkout Repository"
1616
uses: "actions/[email protected]"
1717
- name: "Modify PowerShell Repository"
18-
id: "modify-powershell-repository"
1918
run: |
20-
Write-Host -Object "::set-output name=installation-policy::$((Get-PSRepository -Name 'PSGallery').InstallationPolicy)"
2119
Set-PSRepository -Name 'PSGallery' -InstallationPolicy 'Trusted' -Verbose
2220
- name: "Setup PowerShellGet"
2321
run: |
24-
Install-Module -Name 'PowerShellGet' -MinimumVersion '2.2.5' -Scope 'AllUsers' -AcceptLicense -Verbose
22+
Install-Module -Name 'PowerShellGet' -MinimumVersion '2.2.5' -Scope 'AllUsers' -AcceptLicense -Confirm:$False -Verbose
2523
- name: "Update PowerShell Modules"
2624
run: |
27-
Update-Module -Scope 'AllUsers' -AcceptLicense -Verbose
25+
Update-Module -Scope 'AllUsers' -AcceptLicense -Confirm:$False -Verbose
2826
- name: "Test Publish"
2927
run: |
3028
Publish-Module -Path '.\hugoalh.GitHubActionsToolkit\' -NugetAPIKey 'GUID' -WhatIf -Verbose
3129
- name: "Publish"
3230
run: |
3331
Publish-Module -Path '.\hugoalh.GitHubActionsToolkit\' -NugetAPIKey '${{secrets.POWERSHELLGALLERY_TOKEN}}' -Verbose
34-
- name: "Revert Modify PowerShell Repository"
35-
if: "${{steps.modify-powershell-repository.outcome == 'success' && always()}}"
36-
run: |
37-
Set-PSRepository -Name 'PSGallery' -InstallationPolicy '${{steps.modify-powershell-repository.outputs.installation-policy}}'

0 commit comments

Comments
 (0)