From de9c4351a09e7b1e4ce7d6f292fc215abfe09aa6 Mon Sep 17 00:00:00 2001 From: Arun Ramanathan Date: Mon, 2 Sep 2024 18:22:49 +0530 Subject: [PATCH] fix distribute release workflow --- .../workflows/distribute-zboxcli-choco.yml | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/.github/workflows/distribute-zboxcli-choco.yml b/.github/workflows/distribute-zboxcli-choco.yml index 79a5b683..d1de1ff4 100644 --- a/.github/workflows/distribute-zboxcli-choco.yml +++ b/.github/workflows/distribute-zboxcli-choco.yml @@ -64,9 +64,10 @@ jobs: - name: Create .nuspec file run: | Set-Location -Path "${{ env.PACKAGE_DIR }}" - Write-Host "Current Directory After Set-Location:" - Get-Location - Write-Host "Creating .nuspec file..." + $location = Get-Location + Write-Host "Current Directory: $location" + $files = Get-ChildItem "${{ env.PACKAGE_DIR }}" + Write-Host "Files in Directory: $files" $content = @" @@ -82,17 +83,22 @@ jobs: "@ + + $content | Out-File -FilePath "zbox.nuspec" -Encoding utf8 + Write-Host "Created .nuspec file:" + Get-ChildItem "${{ env.PACKAGE_DIR }}" - New-Item -Path "${{ env.PACKAGE_ID }}.nuspec" -ItemType File -Force - Set-Content -Path "${{ env.PACKAGE_ID }}.nuspec" -Value $content + $fileContent = Get-Content -Path "zbox.nuspec" + Write-Host "File Content: $fileContent" - name: Pack Chocolatey Package run: | - Get-Location - Get-ChildItem "${{ env.PACKAGE_DIR }}" - Move-Item -Path "${{ env.PACKAGE_ID }}.nuspec" -Destination "${{ env.PACKAGE_DIR }}" - Set-Location -Path "${{ env.PACKAGE_DIR }}" - choco pack ${{ env.PACKAGE_ID }}.nuspec + Set-Location -Path "${{ env.PACKAGE_DIR }}" + $location = Get-Location + Write-Host "Current Directory: $location" + $files = Get-ChildItem "${{ env.PACKAGE_DIR }}" + Write-Host "Files in Directory: $files" + choco pack ${{ env.PACKAGE_ID }}.nuspec - name: Push Chocolatey Package run: |