You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have semantic-release installed and configured to run in GitHub Actions. It runs, successfully updating the CHANGELOG.md and including the dist/ distributables in the automated git commit. It also successfully pushes the artifacts up to npm.
However, it does not update the version field of the package.json file.
I have read semantic-release/semantic-release#1593, which reports the same problem. In that issue's discussion, people report that moving the @semantic-release/npm entry before the @semantic-release/git entry in the config fixes the issue. However, this has not worked for me.
Update: The issue is NOT with this package (@semantic-release/npm) but rather with the configuration of @semantic-release/git.
Root cause: @semantic-release/git will only include those files specifically listed in its assets glob list. This means that even though @semantic-release/npm may be updating your package.json file, you must also list it under @semantic-release/git assets for it to be committed.
Example:
[
"@semantic-release/npm"
],
[
"@semantic-release/git",
{
"assets": [
"CHANGELOG.md",
"dist/**",
"package.json", <--- ADD THIS LINE
],
"message": "chore(release): set `package.json` to ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
],
I have
semantic-release
installed and configured to run in GitHub Actions. It runs, successfully updating the CHANGELOG.md and including thedist/
distributables in the automated git commit. It also successfully pushes the artifacts up to npm.However, it does not update the version field of the
package.json
file.Recent example:
I have read semantic-release/semantic-release#1593, which reports the same problem. In that issue's discussion, people report that moving the
@semantic-release/npm
entry before the@semantic-release/git
entry in the config fixes the issue. However, this has not worked for me.Here is my
.releaserc
file content:What must I do to configure
@semantic-release/npm
to update the version field ofpackage.json
?The text was updated successfully, but these errors were encountered: