We’re facing the same problems. Was a bit dissapointed when I found out that GitHub Actions didn’t have push permission when it ran in the CI/CD-environment on protected branches.
We use lerna to handle our monorepo and plan to use the built-in publishing and versioning that comes with lerna based on conventional-commits. Right now that is not possible because we’re forced to disable all of our branch policies if we want the publishing and versioning process to be automated.
If we want to have branch policies active we now have to resolve to manually bumping versions locally, which pretty much means that anyone with push permission on our protected branches can bump to a version that does not follow conventional-commits. It’s also a bit of a chore as for prereleases we want to bump version and publish on a dist-tag when someone completes a pull request merge.
So it’s like picking between two negatives here in my eyes. Either we disable branch policies and hope that everyone follows the protocol and doesn’t make mistakes. What we gain is a streamlined publishing workflow using lerna. Or we enable branch policies to gain control over them and have to manually bump versions for branches.
If anyone have been in the same situation using lerna and got any tips or workarounds to handle this let me know, because I’ve been scratching my head around this for the couple of days on the best way to go forth with this.