From 1621f51aebf08e239f50eeaf68f30d02d8277de8 Mon Sep 17 00:00:00 2001 From: kekkon Date: Fri, 22 Mar 2024 00:57:24 +0100 Subject: [PATCH] chore: Update pipeline with more output --- .github/workflows/main.yaml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index fb7c42b..9fb93f9 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -32,6 +32,7 @@ jobs: "versionManifest='$($versionManifest | ConvertTo-Json)'" | Out-File -FilePath $env:GITHUB_OUTPUT -Append $summary = "### Version manifest `r`n" + '```json' + "`r`n" + $versionManifest + "`r`n" + '````' $summary | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Append + build-release: needs: - plan @@ -49,9 +50,10 @@ jobs: shell: pwsh run: | Import-Module -Force .\Build-Functions.psm1 - Write-Output "::debug::Package lock file location" - Get-LockFiles | ForEach-Object { Write-Output "::debug::\t- $_"} - Write-Output "::debug::Working directory: $(pwd)" + "Package lock file locations:`r`n" | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Append + Get-LockFiles | ForEach-Object { "`t- $_`r`n" | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Append } + "`r`n" | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Append + "Working directory: $(pwd)" | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Append - uses: actions/setup-dotnet@v4 name: Setup dotnet cli with: @@ -69,15 +71,18 @@ jobs: Write-Output "::debug::Encoded version manifest: $env:VERSION_MANIFEST" $versionManifest = $env:VERSION_MANIFEST | ConvertFrom-Json Write-Output "::debug::Decoded version manifest: $versionManifest" - $versionManifest = ConvertFrom-Json -InputObject $versionManifest -AsHashTable + $versionManifest = $versionManifest | ConvertFrom-Json -AsHashTable foreach ($app in $versionManifest.GetEnumerator()) { $packageVersion = $app.Value.SemVer Write-Output "::debug::Building package " + $app.Key + " with version " + $packageVersion - & dotnet build --no-restore $app.Value.Root -c Release --os ${{ matrix.os }} --no-self-contained ` + "Build output for package ${app.Key} with version $packageVersion:`r`n" + '```' | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Append + dotnet build --no-restore $app.Value.Root -c Release --os ${{ matrix.os }} --no-self-contained ` -p:PackageRequireLicenseAcceptance=true ` -p:PackageLicenseFile=LICENSE ` -p:Version=$packageVersion ` -p:PackageProjectUrl=$env:REPO_URL ` - -p:RepositoryUrl=$env:REPO_URL + -p:RepositoryUrl=$env:REPO_URL ` + | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Append + '```' | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Append } \ No newline at end of file