Browse Source

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
pull/33213/head
Stéphane Nicoll 1 year ago
parent
commit
022b91980e
  1. 6
      .github/actions/create-github-release/action.yml
  2. 1
      .github/workflows/release-milestone.yml

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

@ -7,6 +7,10 @@ inputs: @@ -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: @@ -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' || '' }}

1
.github/workflows/release-milestone.yml

@ -72,3 +72,4 @@ jobs: @@ -72,3 +72,4 @@ jobs:
with:
milestone: ${{ needs.build-and-stage-release.outputs.version }}
token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
prerelease: 'true'

Loading…
Cancel
Save