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

Accessing the releaseUrl in hooks #1038

Closed
birtles opened this issue Sep 3, 2023 · 2 comments
Closed

Accessing the releaseUrl in hooks #1038

birtles opened this issue Sep 3, 2023 · 2 comments

Comments

@birtles
Copy link

birtles commented Sep 3, 2023

Hi!

I am using release-it to generate a draft release on GitHub so that I can go in and review/tweak the release notes before publishing it.

release-it helpfully prints out the release URL, here I guess:

this.log.log(`🔗 ${releaseUrl}`);

However, after the GitHub action is run, GitHub folds up the action log and it's quite hard to dig through all the logs to find that line.

I wanted to make that URL easier to find so I tried adding a hook to add it to the action summary along the following lines:

  "hooks": {
    "after:release": "echo 'Draft release: ${releaseUrl}' >> $GITHUB_STEP_SUMMARY"
  },

However, it looks like releaseUrl is not available as I get:

ERROR Unable to render template with context:
echo 'Draft release: ${releaseUrl}' >> $GITHUB_STEP_SUMMARY
...
ERROR ReferenceError: releaseUrl is not defined

Would it be possible to make this available, or is there another means of doing this?

@webpro webpro closed this as completed in 07f373e Sep 23, 2023
@webpro
Copy link
Collaborator

webpro commented Sep 23, 2023

🚀 This issue has been resolved in v16.2.0. See Release 16.2.0 for release notes.

@birtles
Copy link
Author

birtles commented Sep 28, 2023

Thank you so much!

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

No branches or pull requests

2 participants