66 SkipReleaseNotes : ${{ true }}
77
88on :
9- push :
10- branches : [ main ]
119 pull_request :
1210 branches : [ main ]
13- workflow_dispatch :
11+
12+ concurrency :
13+ group : ${{ github.workflow }}-${{ github.ref }}
14+ cancel-in-progress : true
1415
1516jobs :
1617
@@ -90,10 +91,12 @@ jobs:
9091 shell : pwsh
9192 run : |
9293 $fileName = (Get-ChildItem [0-9]*.md -Recurse | Sort-Object Name | Select -ExpandProperty FullName -Last 1)
93- echo $fileName
94- $releaseNotes = (Get-Content $fileName -Encoding UTF8 | Select-Object -Skip 4) -join '%0A'
95- echo $releaseNotes
96- Write-Output "::set-output name=RELEASE_NOTES::$releaseNotes"
94+ Write-Output $fileName
95+ $releaseNotes = (Get-Content $fileName -Encoding UTF8 | Select-Object -Skip 4)
96+ Write-Output $releaseNotes
97+ Write-Output 'RELEASE_NOTES<<EOF' >> $env:GITHUB_OUTPUT
98+ Write-Output $releaseNotes >> $env:GITHUB_OUTPUT
99+ Write-Output 'EOF' >> $env:GITHUB_OUTPUT
97100 - name : Create Draft Release
98101 id : create_release
99102 shell : pwsh
@@ -132,15 +135,10 @@ jobs:
132135 runs-on : ubuntu-latest
133136 environment : production
134137 needs : [ Staging ]
135- if : ${{ github.event_name != 'pull_request' }}
136138 env :
137139 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
138140 BUILD_NAME : ${{ needs.Staging.outputs.BUILD_NAME }}
139141 steps :
140- - name : Cancel Previous Runs
141- uses : styfle/cancel-workflow-action@0.12.1
142- with :
143- access_token : ${{ github.token }}
144142 - name : Promote release
145143 id : promote_release
146144 shell : pwsh
@@ -155,8 +153,8 @@ jobs:
155153 $rel = Get-GitHubRelease `
156154 | Where-Object { ($_.Draft -eq $true) -and ($_.Name -eq "Release $($env:BUILD_NAME)") }
157155 Set-GitHubRelease -Release $rel.id -Draft:$false
158- Write-Output "::set-output name= RELEASE_URL:: $($rel.html_url)"
159- Write-Output "::set-output name= RELEASE_TAG:: $($env:BUILD_NAME.Replace('+', '%2B'))"
156+ Write-Output "RELEASE_URL= $($rel.html_url)" >> $env:GITHUB_OUTPUT
157+ Write-Output "RELEASE_TAG= $($env:BUILD_NAME.Replace('+', '%2B'))" >> $env:GITHUB_OUTPUT
160158 outputs :
161159 BUILD_NAME : ${{ needs.Staging.outputs.BUILD_NAME }}
162160 RELEASE_NOTES : ${{ needs.Staging.outputs.RELEASE_NOTES }}
@@ -167,7 +165,6 @@ jobs:
167165
168166 runs-on : ubuntu-latest
169167 needs : [ Release ]
170- if : ${{ github.event_name != 'pull_request' }}
171168 env :
172169 BUILD_NAME : ${{ needs.Release.outputs.BUILD_NAME }}
173170 RELEASE_NOTES : ${{ needs.Release.outputs.RELEASE_NOTES }}
@@ -187,8 +184,8 @@ jobs:
187184 git checkout --track origin/gh-pages
188185 unzip -o ../../TfsCmdlets-Docs-*.zip
189186 popd
190- echo build_info: TfsCmdlets v${BUILD_NAME}, released $(date +%F) >> _config.yml
191- echo >> _config.yml
187+ Write-Output build_info: TfsCmdlets v${BUILD_NAME}, released $(date +%F) >> _config.yml
188+ Write-Output >> _config.yml
192189 git config --local user.name "Igor Abade"
193190 git config --local user.email igoravl@gmail.com
194191 git add *
@@ -200,7 +197,6 @@ jobs:
200197 runs-on : ubuntu-latest
201198 needs : [ Release ]
202199 environment : psgallery
203- if : ${{ github.event_name != 'pull_request' }}
204200 env :
205201 RELEASE_NOTES : ${{ needs.Release.outputs.RELEASE_NOTES }}
206202 PSGALLERY_KEY : ${{ secrets.API_KEY }}
@@ -223,7 +219,6 @@ jobs:
223219 runs-on : ubuntu-latest
224220 needs : [ Release ]
225221 environment : nuget
226- if : ${{ github.event_name != 'pull_request' }}
227222 steps :
228223 - name : Download artifact
229224 uses : actions/download-artifact@v4
@@ -243,7 +238,6 @@ jobs:
243238 runs-on : windows-latest
244239 needs : [ Release ]
245240 environment : chocolatey
246- if : ${{ github.event_name != 'pull_request' }}
247241 env :
248242 CHOCO_KEY : ${{ secrets.API_KEY }}
249243 steps :
@@ -266,7 +260,6 @@ jobs:
266260 runs-on : ubuntu-latest
267261 needs : [ Release ]
268262 environment : winget
269- if : ${{ github.event_name != 'pull_request' }}
270263 env :
271264 GITHUB_TOKEN : ${{ secrets.API_GITHUB_TOKEN }}
272265 BUILD_NAME : ${{ needs.Release.outputs.BUILD_NAME }}
@@ -324,7 +317,7 @@ jobs:
324317 steps :
325318 - name : No-op
326319 shell : bash
327- run : echo "no-op"
320+ run : Write-Output "no-op"
328321 # - name: Tweet
329322 # id: tweet
330323 # uses: snow-actions/tweet@v1.3.0
0 commit comments