-
Notifications
You must be signed in to change notification settings - Fork 306
create release with body text sourced from file #50
Conversation
release body based on file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome job, I'm expecting this function
@IAmHughes / @csexton - could one of you please consider merging this PR to master? The example to set the body output and cat the file only gets the first line of the file for me, which i generate using gren. Thank you! |
will this be merged at some point? |
body_path missing from action.yml
Would be nice to get this into the official action as I have found that even using the other "workarounds" to generate a Looks like it needs a rebase to be mergeable however, @jbolda |
I am generally waiting on a 👍 from @jasonkarns or whomever; not particularly keen on rebasing multiple times. |
@jbolda I'm not a member of the Actions team so I don't have merge ability in this repo 😬 |
@@ -19,6 +20,16 @@ async function run() { | |||
const draft = core.getInput('draft', { required: false }) === 'true'; | |||
const prerelease = core.getInput('prerelease', { required: false }) === 'true'; | |||
|
|||
const bodyPath = core.getInput('body_path', { required: false }); | |||
let bodyFileContent = null; | |||
if (bodyPath !== '' && !!bodyPath) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I won't speak to the style that the actions team prefers, but bodyPath !== '' &&
is redundant, here. (The boolean value of the empty string is false
.) Which would allow further reduction to just if(bodyPath)
. There's no reason to force cast to an actual boolean here because the type casting is already handled by falsiness.
Is this PR going be merged anytime soon? We urgently need it in our project. |
I've been waiting since March 25th. This is a very valuable feature. I don't understand what the holdups continue to be... |
maybe we can ping @mscoutermarsh to get someone to look at it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Getting this merged.
Just tagged https://github.com/actions/create-release/releases/tag/v1.1.2. Please give it a try and let me know if you run into any problems. If no issues, we'll bring into the v1 tag. |
@mscoutermarsh successfully used the tagged version of |
This PR adds an additional option to create a release with the description pulled in from a file. This is useful as a user can pipe output into a text file in the steps leading up to this step running to create the release. This allows for more dynamic descriptions than allowed by the existing
body
and opens up the ability to use the full range of markdown parsers and libraries.I have a tagged release if anyone would like to test drive it.