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.js file stays as is (i.e., it defines to use the @semantic-release/npm plugin), and the workflow removes that entry if there is no package.json file.
- We update the default
release-config.js file to no longer include the @semantic-release/npm plugin, and the workflow injects the current entry if there is a package.json file.
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
Is your feature request related to a problem?
When using the
automatic-releaseworkflow, it currently is a hard requirement to have apackage.jsonfile, otherwise thesemantic-releaseexecution will fail. This is because the (default) configuration currently always includes the@semantic-release/npmplugin, which fails if there is nopackage.jsonto be found.Describe the desired solution
It would be better to only add the
@semantic-release/npmplugin if there is apackage.jsonfile in the repository, otherwise some PHP-only repositories will continue to have apackage.jsonfile for nothing.This can be done in two ways, in the workflow itself:
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.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.jsoneven if they don't need it for anything else.Additional context
No response
Code of Conduct