File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4949 # branch (not main) and uses gh to open + auto-merge the PR.
5050 token : ${{ secrets.GITHUB_TOKEN }}
5151
52+ - name : Detect beta tag
53+ id : beta
54+ shell : pwsh
55+ run : |
56+ $isBeta = '${{ github.ref_name }}' -like '*-beta*'
57+ "is_beta=$($isBeta.ToString().ToLower())" >> $env:GITHUB_OUTPUT
58+
5259 - name : Fetch release tags
5360 shell : pwsh
5461 run : |
@@ -152,7 +159,9 @@ jobs:
152159 $notes | Out-File -LiteralPath $notesPath -Encoding utf8 -NoNewline
153160 "input_path=$notesPath" >> $env:GITHUB_OUTPUT
154161 # gh release create accepts the asset paths as positional arguments after the tag.
155- gh release create $tag $zip --title $tag --notes-file $notesPath
162+ $extra = @()
163+ if ('${{ steps.beta.outputs.is_beta }}' -eq 'true') { $extra = @('--prerelease','--latest=false') }
164+ gh release create $tag $zip --title $tag --notes-file $notesPath @extra
156165
157166 - name : Verify published release body matches input
158167 env :
@@ -368,6 +377,7 @@ jobs:
368377 echo "Hash append commit: $new_oid (verified)"
369378
370379 - name : Open promotion PR + enable auto-merge
380+ if : ${{ steps.beta.outputs.is_beta != 'true' }}
371381 # We can't push directly to main: branch protection requires the
372382 # "dotnet build + test" status check, which a bot push bypasses (so
373383 # the push is rejected). Instead we open a PR off the tag and let
You can’t perform that action at this time.
0 commit comments