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

[Feature Request]: Remove the requirement to having a package.json file for the automatic release workflow #165

Open
1 task done
tfrommen opened this issue Oct 2, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@tfrommen
Copy link
Member

tfrommen commented Oct 2, 2024

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

  • I agree to follow this project's Code of Conduct
@tfrommen tfrommen added the enhancement New feature or request label Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant