Skip to content

Commit 06a277e

Browse files
committed
fix: streamline publish workflow by removing redundant steps and using publish action
1 parent 65a44ee commit 06a277e

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

.github/workflows/publishpackage.yml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,8 @@ jobs:
2121
files: |
2222
*.ps1
2323
*.psm1
24-
- name: publish to powershell gallery
25-
shell: pwsh
26-
env:
27-
nugetkey: ${{secrets.NUGETKEY}}
28-
run: |
29-
$data = Import-PowerShellDataFile .\code365scripts.openai\code365scripts.openai.psd1
30-
if($data.RequiredModules) {
31-
$data.RequiredModules | Foreach-Object {Install-Module -Name $_.ModuleName -RequiredVersion $_.ModuleVersion }
32-
}
33-
Remove-Item -Path ".git" -Recurse -Force
34-
Remove-Item -Path ".github" -Recurse -Force
35-
Remove-Item -Path ".vscode" -Recurse -Force
36-
Publish-Module -Path code365scripts.openai -NuGetApiKey $env:nugetkey
24+
- name: Publish Module to PowerShell Gallery
25+
uses: pcgeek86/publish-powershell-module-action@v20
26+
id: publish-module
27+
with:
28+
NuGetApiKey: ${{ secrets.NUGETKEY }}

0 commit comments

Comments
 (0)