Description
Hi,
In our semantic release, we added a simple additional step - running a shell script that updates src/Constants/Package.ts
file. On inspection we see, that the file is updated and committed. The chore(release) commit includes the correct version of Package.ts file. However the final build of the package only includes the previous state of Package.ts. Meaning, that each subsequent build will have the previous version of Package.ts. So how could the release part ignore the new state of Package.ts, but accept changes on package.json or changelog?
Here's the release.config.js:
export function semanticReleaseConfig(params: Params = defaultParams) { return { branches: [ '+([0-9])?(.{+([0-9]),x}).x', params.defaultBranch ?? defaultParams.defaultBranch, 'next', 'next-major', { name: 'beta', prerelease: true }, { name: 'alpha', prerelease: true }, { name: 'rc', prerelease: true }, ], plugins: [ '@semantic-release/commit-analyzer', '@semantic-release/release-notes-generator', '@semantic-release/changelog', '@semantic-release/gitlab', [ '@semantic-release/npm', { npmPublish: true }, ], [ '@semantic-release/exec', { prepareCmd: './version.sh ${nextRelease.version}', }, ], [ '@semantic-release/git', { assets: [ 'CHANGELOG.md', 'package.json', 'package-lock.json', 'src/Constants/Package.ts', ], }, ], ], }; }