hubotio / hubot

A customizable life embetterment robot.
https://hubotio.github.io/hubot/
MIT License
16.64k stars 3.75k forks source link

The automated release is failing 🚨 #1622

Closed github-actions[bot] closed 1 year ago

github-actions[bot] commented 1 year ago

:rotating_light: The automated release from the master branch failed. :rotating_light:

I recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can fix this 💪.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here are some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


No npm token specified.

An npm token must be created and set in the NPM_TOKEN environment variable on your CI environment.

Please make sure to create an npm token and to set it in the NPM_TOKEN environment variable on your CI environment. The token must allow to publish to the registry https://registry.npmjs.org/.


Good luck with your project ✨

Your semantic-release bot :package::rocket:

joeyguerra commented 1 year ago

@technicalpickles NPM_TOKEN is missing and I don't have access to set secrets. Do you? This seems useful: https://docs.github.com/en/actions/learn-github-actions/variables#creating-configuration-variables-for-a-repository

technicalpickles commented 1 year ago

I can. Of course, the user that was setup for NPM goes to my old work email 😓

I will poke around and see if I can setup something.

joeyguerra commented 1 year ago

I can generate a token. I just don't have access to add it to Github.

joeyguerra commented 1 year ago

@technicalpickles any luck?

technicalpickles commented 1 year ago

I've fixed the NPM_TOKEN. Brief outline:

It succeeds now, but doesn't seem to have made a release: https://github.com/hubotio/hubot/actions/runs/4885165266/jobs/8814350358

Digging into it a bit more still

technicalpickles commented 1 year ago

So, reading over some of the output, it really seems like it's scanning the commits, and not the PR titles. One way to make it work would be to use Squash & Rebase rather than Merge. If we enforce the title follows semantic-release's conventions, then the squash and merge would end up with a semantic commit message, and trigger it that way. I know I was the one that suggested trying to do it this way, but I forgot that we use Squash & Rebase, which is what makes it work.

Oh, I think I found it. This might help: https://github.com/marketplace/actions/conventional-pull-request ... digging in more.

joeyguerra commented 1 year ago

I'm lost because every commit message I used was "chore(release): Add semantic-release". So there's 3 commits, all with that same message. Which I thought was the correct format. What am I missing?

technicalpickles commented 1 year ago

Your guess is as good as mine at this rate. Check this out: https://github.com/hubotio/hubot/actions/runs/4885165266/jobs/8814350358

chore(release): Add semantic-release
[12:43:39 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The commit should not trigger a release
[12:43:39 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: chore(release): Add semantic-release
[12:43:39 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The commit should not trigger a release
[12:43:39 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: chore(release): Add semantic-release
[12:43:[39](https://github.com/hubotio/hubot/actions/runs/4885165266/jobs/8814350358#step:7:40) AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The commit should not trigger a release
[12:43:39 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: chore(release): Add semantic-release
[12:43:39 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The commit should not trigger a release
[12:43:39 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: Merge pull request #1617 from hubotio/update-rest-of-dependencies

That does not seem to be the format needed. I think based on https://github.com/semantic-release/semantic-release#commit-message-format would need a commit like feat: new feature.

I think for now:

I think those things will fix it for next time 🤞🏻

joeyguerra commented 1 year ago

ah. Yes. semantic-release only creates a release if there's a commit message with feat, fix or BREAKING CHANGE, but not for commit messages with chore and this PR only has chore commit messages. Programming is so hard!

xurizaemon commented 1 year ago

The machine did the thing! v4.0.0 happened