New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Protected branch update failed for refs/heads/main. How to handle it? #2604
Comments
This comment has been minimized.
This comment has been minimized.
+1 |
first, consider whether you really need to make commits during your release workflow. semantic-release works well without doing so, which is a big reason we do not include the git plugin in our default configuration. if you decide that you still want to make commits as part of your release workflow, you need to use a token from a user that has permissions to bypass your branch protection rules. your options for doing so depend on how youve configured your branch protection |
We noticed that using a fine grained PAT isn't possible even with
activated (we tried also with all permissions activated), still the tag push isn't working. On our end we need the git plugin as we push assets. A classic token made this again possible. Not sure about the exact difference between classic and [beta] fine grained tokens, but that's what we noticed ... |
If you have protected branches, you need to use a PAT. (Classic or fine grained). PAT user needs to be exempt from branch protection rules. You also need to define ENV Vars in the release step so everything matches up. For an example workflow see this repo. |
Current behavior
One of my organizational repositories is using semantic-release, this is the first use, my main branch has protection rules turned on, and then this happens, how do I deal with it? Can you pull request instead of push?
The Github token has all the permissions except the deletion permission.
Expected behavior
I hope I can pass ci normally
semantic-release
version19.0.5
CI environment
github actions
Plugins used
No response
semantic-release
configurationCI logs
The text was updated successfully, but these errors were encountered: