-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Is your feature request related to a problem?
When using the automatic-release workflow, it currently is a hard requirement to have a package.json file, otherwise the semantic-release execution will fail. This is because the (default) configuration currently always includes the @semantic-release/npm plugin, which fails if there is no package.json to be found.
Describe the desired solution
It would be better to only add the @semantic-release/npm plugin if there is a package.json file in the repository, otherwise some PHP-only repositories will continue to have a package.json file for nothing.
This can be done in two ways, in the workflow itself:
- The default
release-config.jsfile stays as is (i.e., it defines to use the@semantic-release/npmplugin), and the workflow removes that entry if there is nopackage.jsonfile. - We update the default
release-config.jsfile to no longer include the@semantic-release/npmplugin, and the workflow injects the current entry if there is apackage.jsonfile.
Describe the alternatives that you have considered
An addition to the two options for updating the workflow file (and config), we could continue with what we have. This means that all repositories are required to have a package.json even if they don't need it for anything else.
Additional context
No response
Code of Conduct
- I agree to follow this project's Code of Conduct