Skip to content

Commit 022b919

Browse files
committed
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
1 parent 1a21977 commit 022b919

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.github/actions/create-github-release/action.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ inputs:
77
token:
88
description: 'Token to use for authentication with GitHub'
99
required: true
10+
prerelease:
11+
description: 'Whether the release is a pre-release (milestone or release candidate)'
12+
required: false
13+
default: 'false'
1014
runs:
1115
using: composite
1216
steps:
@@ -20,4 +24,4 @@ runs:
2024
env:
2125
GITHUB_TOKEN: ${{ inputs.token }}
2226
shell: bash
23-
run: gh release create ${{ format('v{0}', inputs.milestone) }} --notes-file changelog.md
27+
run: gh release create ${{ format('v{0}', inputs.milestone) }} --notes-file changelog.md ${{ inputs.prerelease == 'true' && '--prerelease' || '' }}

.github/workflows/release-milestone.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,4 @@ jobs:
7272
with:
7373
milestone: ${{ needs.build-and-stage-release.outputs.version }}
7474
token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
75+
prerelease: 'true'

0 commit comments

Comments
 (0)