From 00a93e0956f988c074193d9910c0dd7c3434b09f Mon Sep 17 00:00:00 2001 From: Igor Abade Date: Wed, 24 Jul 2024 12:55:32 -0300 Subject: [PATCH] Replace echo with Write-Output --- .github/workflows/main.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4437a767..c9ab4fc2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -87,12 +87,12 @@ jobs: shell: pwsh run: | $fileName = (Get-ChildItem [0-9]*.md -Recurse | Sort-Object Name | Select -ExpandProperty FullName -Last 1) - echo $fileName + Write-Output $fileName $releaseNotes = (Get-Content $fileName -Encoding UTF8 | Select-Object -Skip 4) - echo $releaseNotes - echo 'RELEASE_NOTES<> $env:GITHUB_OUTPUT - echo $releaseNotes >> $env:GITHUB_OUTPUT - echo 'EOF' >> $env:GITHUB_OUTPUT + Write-Output $releaseNotes + Write-Output 'RELEASE_NOTES<> $env:GITHUB_OUTPUT + Write-Output $releaseNotes >> $env:GITHUB_OUTPUT + Write-Output 'EOF' >> $env:GITHUB_OUTPUT - name: Create Draft Release id: create_release shell: pwsh @@ -153,8 +153,8 @@ jobs: $rel = Get-GitHubRelease ` | Where-Object { ($_.Draft -eq $true) -and ($_.Name -eq "Release $($env:BUILD_NAME)") } Set-GitHubRelease -Release $rel.id -Draft:$false - echo "RELEASE_URL=$($rel.html_url)" >> $env:GITHUB_OUTPUT - echo "RELEASE_TAG=$($env:BUILD_NAME.Replace('+', '%2B'))" >> $env:GITHUB_OUTPUT + Write-Output "RELEASE_URL=$($rel.html_url)" >> $env:GITHUB_OUTPUT + Write-Output "RELEASE_TAG=$($env:BUILD_NAME.Replace('+', '%2B'))" >> $env:GITHUB_OUTPUT outputs: BUILD_NAME: ${{ needs.Staging.outputs.BUILD_NAME }} RELEASE_NOTES: ${{ needs.Staging.outputs.RELEASE_NOTES }} @@ -185,8 +185,8 @@ jobs: git checkout --track origin/gh-pages unzip -o ../../TfsCmdlets-Docs-*.zip popd - echo build_info: TfsCmdlets v${BUILD_NAME}, released $(date +%F) >> _config.yml - echo >> _config.yml + Write-Output build_info: TfsCmdlets v${BUILD_NAME}, released $(date +%F) >> _config.yml + Write-Output >> _config.yml git config --local user.name "Igor Abade" git config --local user.email igoravl@gmail.com git add * @@ -322,7 +322,7 @@ jobs: steps: - name: No-op shell: bash - run: echo "no-op" + run: Write-Output "no-op" # - name: Tweet # id: tweet # uses: snow-actions/tweet@v1.3.0