Skip to content

Commit

Permalink
Replace echo with Write-Output
Browse files Browse the repository at this point in the history
  • Loading branch information
igoravl committed Jul 24, 2024
1 parent 81ae7fd commit 00a93e0
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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<<EOF' >> $env:GITHUB_OUTPUT
echo $releaseNotes >> $env:GITHUB_OUTPUT
echo 'EOF' >> $env:GITHUB_OUTPUT
Write-Output $releaseNotes
Write-Output 'RELEASE_NOTES<<EOF' >> $env:GITHUB_OUTPUT
Write-Output $releaseNotes >> $env:GITHUB_OUTPUT
Write-Output 'EOF' >> $env:GITHUB_OUTPUT
- name: Create Draft Release
id: create_release
shell: pwsh
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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 [email protected]
git add *
Expand Down Expand Up @@ -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/[email protected]
Expand Down

0 comments on commit 00a93e0

Please sign in to comment.