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 GHA tag, name, & version to the release body template object #1390

Closed
wants to merge 4 commits into from

Conversation

jmuzina
Copy link

@jmuzina jmuzina commented May 8, 2024

What's changed

Adds support for template replacement of the following action input variables in .github/release-drafter.yml:

Variable Description
$INPUT_TAG input.tag from GHA workflow
$INPUT_NAME input.name from GHA workflow
$INPUT_VERSION input.version from GHA workflow

Reason / Use case

I am using the input.version action input to pass in a specific version for the drafted release without using $NEXT_PATCH_VERSION, $NEXT_MINOR_VERSION, $NEXT_MAJOR_VERSION, $RESOLVED_VERSION etc. I want to also be able to use this inputted value in the body of the release draft, but noticed it is not supported in any of the template variable sections here, and not passed into template() in generateReleaseInfo() (link).

@jmuzina
Copy link
Author

jmuzina commented May 8, 2024

Update.... is $INPUT_VERSION already supported? I think I just found it here:

$INPUT_VERSION: splitSemVersion(input, 'inputVersion'),
but it is not documented in README so it was hard to tell that this behavior was supported :)

@jetersen
Copy link
Member

jetersen commented May 8, 2024

You can use both $RESOLVED_VERSION or $INPUT_VERSION
$RESOLVED_VERSION can be overwritten by $INPUT_VERSION but also can also be resolved by the semver increment operation chosen (major, minor, patch)

@jmuzina jmuzina closed this May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants