Publish release notes as a pre-release for milestones

This commit updates the "create-github-release" action to allow an
additional input that specifies whether this is a pre-release. If that
is the case, then the `--prerelease` flag is set.

Closes gh-33200
This commit is contained in:
Stéphane Nicoll
2024-07-11 15:58:32 +02:00
parent 1a21977965
commit 022b91980e
2 changed files with 6 additions and 1 deletions

View File

@@ -7,6 +7,10 @@ inputs:
token:
description: 'Token to use for authentication with GitHub'
required: true
prerelease:
description: 'Whether the release is a pre-release (milestone or release candidate)'
required: false
default: 'false'
runs:
using: composite
steps:
@@ -20,4 +24,4 @@ runs:
env:
GITHUB_TOKEN: ${{ inputs.token }}
shell: bash
run: gh release create ${{ format('v{0}', inputs.milestone) }} --notes-file changelog.md
run: gh release create ${{ format('v{0}', inputs.milestone) }} --notes-file changelog.md ${{ inputs.prerelease == 'true' && '--prerelease' || '' }}