Skip to content

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

@tfrommen

Description

@tfrommen

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions