cycjimmy / semantic-release-action

GitHub Action for Semantic Release
https://github.com/marketplace/actions/action-for-semantic-release
MIT License
552 stars 98 forks source link

Incompatibility with v22 of semantic-release #176

Closed mirkolenz closed 9 months ago

mirkolenz commented 1 year ago

Describe the bug

When using v4 of this action with v22 of semantic-release, I get the following error:

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './package.json' is not defined by "exports" in /home/runner/work/_actions/cycjimmy/semantic-release-action/v4/node_modules/semantic-release/package.json

I found out that in v21, semantic-release used the attribute main in its package.json, but as of v22 has switched to the more modern exports attribute. It seems that the following snippet (maybe others as well?) is incompatible with this change: https://github.com/cycjimmy/semantic-release-action/blob/a8347177c7985e6a60e9997c6c8cbbebf1c6ff63/src/handleOptions.js#L17

Example Workflow

https://github.com/recap-utr/arg-services/blob/main/.github/workflows/release.yml

Additional Context There is an open issue in the repo of semantic-release about the change from main to exports: https://github.com/semantic-release/semantic-release/issues/2968

aperov9 commented 1 year ago

+1 ran into the same error after setting semantic-release to v22 with the action on v4

travi commented 1 year ago

see https://github.com/semantic-release/semantic-release/releases/tag/v22.0.3

mirkolenz commented 1 year ago

@travi Thank you, I just tested the new version in my CI pipeline and it works just as expected! Shall we leave the issue open to track the upcoming API changes (https://github.com/semantic-release/semantic-release/issues/2978) or close it for now?

cycjimmy commented 9 months ago

Currently running stably, temporarily closed.