Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for cr --generate-release-notes #169

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ inputs:
description: Mark the created GitHub release as 'latest'
required: false
default: true
generate_release_notes:
description: Automatically generate the name and body for this release. See https://docs.github.com/en/rest/releases/releases
required: false
default: true
packages_with_index:
description: "Upload chart packages directly into publishing branch"
required: false
Expand Down Expand Up @@ -90,6 +94,10 @@ runs:
args+=(--mark-as-latest "${{ inputs.mark_as_latest }}")
fi

if [[ -n "${{ inputs.generate_release_notes }}" ]]; then
args+=(--generate-release-notes "${{ inputs.generate_release_notes }}")
fi

if [[ -n "${{ inputs.packages_with_index }}" ]]; then
args+=(--packages-with-index "${{ inputs.packages_with_index }}")
fi
Expand Down
11 changes: 11 additions & 0 deletions cr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Usage: $(basename "$0") <options>
-s, --skip-packaging Skip the packaging step (run your own packaging before using the releaser)
--skip-existing Skip package upload if release exists
-l, --mark-as-latest Mark the created GitHub release as 'latest' (default: true)
--generate-release-notes Automatically generate the name and body for this release. See https://docs.github.com/en/rest/releases/releases (default: true)
--packages-with-index Upload chart packages directly into publishing branch
EOF
}
Expand All @@ -51,6 +52,7 @@ main() {
local skip_packaging=
local skip_existing=
local mark_as_latest=true
local generate_release_notes=true
local packages_with_index=false
local pages_branch=

Expand Down Expand Up @@ -198,6 +200,12 @@ parse_command_line() {
shift
fi
;;
--generate-release-notes)
if [[ -n "${2:-}" ]]; then
generate_release_notes="$2"
shift
fi
;;
-l | --mark-as-latest)
if [[ -n "${2:-}" ]]; then
mark_as_latest="$2"
Expand Down Expand Up @@ -319,6 +327,9 @@ release_charts() {
if [[ "$mark_as_latest" = false ]]; then
args+=(--make-release-latest=false)
fi
if [[ "$generate_release_notes" = true ]]; then
args+=(--generate-release-notes)
fi
if [[ -n "$pages_branch" ]]; then
args+=(--pages-branch "$pages_branch")
fi
Expand Down