nih-sparc / sparc.client

Python client for NIH SPARC
https://docs.sparc.science/docs/sparc-python-client
Apache License 2.0
0 stars 8 forks source link

Release action not working under branch protection rules #38

Open athril opened 7 months ago

athril commented 7 months ago

In order to release a new version of the software, in the repository's Setting -> Branches -> main you need to uncheck the following options:

Otherwise, the Release new version action (release.yml) will fail with the following error:

Error: To https://github.com/nih-sparc/sparc.client
!   refs/heads/main:refs/heads/main [remote rejected] (protected branch hook declined)
Done
Pushing to https://github.com/nih-sparc/sparc.client
POST git-receive-pack (2445 bytes)
remote: error: GH006: Protected branch update failed for refs/heads/main.        
remote: error: Changes must be made through a pull request. You're not authorized to push to this branch. Visit https://docs.github.com/articles/about-protected-branches/ for more information.        
error: failed to push some refs to 'https://github.com/nih-sparc/sparc.client'

It may be the matter of changing permissions, or finding a workaround (launching an action that makes a pull requests and automatically approves it).

If the release action fails, please run git push --delete origin v0.3.0 (with proper version name) to remove tag from the repo.