googleapis / release-please-action

automated releases based on conventional commits
Apache License 2.0
1.56k stars 200 forks source link

Missing required file: package.json when using path config #974

Open evtk opened 2 months ago

evtk commented 2 months ago

TL;DR

The package I want to create a release for is in a subfolder aws. I configured the path option in the release-please action, but I get an error.

I take it the configuration as explained here: https://github.com/google-github-actions/release-please-action?tab=readme-ov-file#action-inputs, still works for v4.

Expected behavior

No errors

Observed behavior

release-please failed: node (my-repo-name): Missing required file: package.json

Action YAML

steps:
      - id: release
        uses: google-github-actions/release-please-action@v4
        with:
          release-type: node
          path: ./aws


### Log output

_No response_

### Additional information

_No response_
joshghent commented 2 months ago

Got this same problem.

hasithaishere commented 2 months ago

Faced same problem

evtk commented 2 months ago

I was able to fix it, by following these guidelines: https://github.com/google-github-actions/release-please-action?tab=readme-ov-file#upgrading-from-v3-to-v4

and configuring the path in release-please-config.json like this:

{
  "packages": {
    "aws": {
      "release-type": "node"
    }
  }
}

and creating the .release-please-manifest.json like this.

{
  "aws": "1.0.0"
}

But the documentation clearly puts you on the wrong track for this. Also it seems it creates some sort of sub-package 'aws' which isn't exactly what I was looking for, but it solves it for now.