The release pipeline is unable to push to the main branch when branch protection rules are enforced.
Branch protection rules are desirable to prevent force pushing and require status checks to pass before PR merge.
It is a long-standing known limitation of Github that GA can't be exempted from branch protection rules, however Deploy Keys, Roles and specific Apps can.
The current best solution for this seems to be using a Deploy Key, but this approach currently has issues with release-it, resulting in the following:
> release-it -VV --ci --npm.skipChecks --no-git.requireCleanWorkingDir "--preRelease=next" "--npm.tag=next"
$ git rev-parse --abbrev-ref HEAD
main
$ git config --get branch.main.remote
origin
$ git remote get-url origin
git@github.com:webdriverio-community/wdio-electron-service.git
$ git fetch
Warning: Identity file /d06a28ed-398b-4f71-a5ac-97168fa6a4b5 not accessible: No such file or directory.
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
The release pipeline is unable to push to the
main
branch when branch protection rules are enforced.Branch protection rules are desirable to prevent force pushing and require status checks to pass before PR merge.
It is a long-standing known limitation of Github that GA can't be exempted from branch protection rules, however Deploy Keys, Roles and specific Apps can.
The current best solution for this seems to be using a Deploy Key, but this approach currently has issues with
release-it
, resulting in the following: