I am working on a single application repo which pipeline should publish only specific NPM packages based on file changes of the repo.
Most of the workflow would stay the same, but let’s say two jobs (build and deploy) should change behavior based on which files have changed current PR vs the main branch.
Reading on the internet I could see there have been a few different approaches.
In the past years, as far as I understood ppl used custom scripts to get which files were changing, then read from a file what was changed and let the command or circleci config behave accordingly.
Trigger separate config.yml configurations, which exist outside the default parent ./circleci/ directory
Now my question is… is dynamic the best practice I should follow? I believe would work, used in combination with path-finder + continuation.
This approach, just feels a bit overkilling having to introduce a setup workflows and those orbs, when all I need is to know which files have changed. A simple script such as lerna would work great for me. I am not using Lerna so I would eventually need to find one that works for me but sounds simple and specific for my needs.
Am I not seeing the benefits dynamic config would bring me in close or long run ?
Or a script is still an efficient approach for me?