Skip to content

Commit 9e4d99b

Browse files
committed
fix: add module preparation and cleanup steps in publish workflow
1 parent 4978e76 commit 9e4d99b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/publishpackage.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,17 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v4
15+
- name: prepare and publish module
16+
shell: pwsh
17+
run: |
18+
Set-PSRepository -Name "PSGallery" -InstallationPolicy Trusted
19+
$data = Import-PowerShellDataFile .\code365scripts.openai\code365scripts.openai.psd1
20+
if($data.RequiredModules) {
21+
$data.RequiredModules | Foreach-Object {Install-Module -Name $_.ModuleName -RequiredVersion $_.ModuleVersion }
22+
}
23+
Remove-Item -Path ".git" -Recurse -Force
24+
Remove-Item -Path ".github" -Recurse -Force
25+
Remove-Item -Path ".vscode" -Recurse -Force
1526
# - uses: dlemstra/code-sign-action@v1
1627
# with:
1728
# certificate: ${{ secrets.CERTIFICATE }}

0 commit comments

Comments
 (0)