Ability to combine `version` & `publish` commands together for protected branches
See original GitHub issueProblem
Hello there
In monorepos with main branch protected with pull request necessity, I think it is better to only add changesets to the pull request (summary & bump types can be reviewed by contributors also) & finally by merging to the main branch, changesets github action would “version
& publish
” to the registry itself.
Right now, as I inspected the whole doc and API, after merging to the main branch, again another PR is created by the action & by merging the subsequent PR, publishing would happen. I think the PR creation by the action in this scenario is redundant completely.
It would be great if we could config the action in a way so that “version
& publish
” commands are run one after another.
Issue Analytics
- State:
- Created a year ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
How GitLab Permissions and Protected Branches Keep Your ...
By basing permissions on simple principles and adding protected branches, GitLab allows you to set up any type of workflow, while protecting ...
Read more >Release-it with with 2 protected prerelease branches and 1 ...
Hi all I try to set up release-it so that we can create releases based on merging into our prerelease and release branches....
Read more >How do I solve merge conflicts on a protected branch?
git merge origin/release --no-ff # merge in the release branch; Resolve all the conflicts and commit. push -u merge-release-into-master # Push ...
Read more >Limit pushes and merges to branches in AWS CodeCommit
Other developers can still pull from the branch, make their own branches, and create pull requests, but they cannot push or merge changes...
Read more >How to set up Git branch protection rules - Security Boulevard
Branch Name – Name of the branch to be protected. · Allowed To Merge – You can select the role that is allowed...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yeah, the main problem here is that you need to bump versions and remove the changeset files from git - both of those usually require an additional commit to be created. If that would happen whenever you merge something to your base branch then it would become quite cumbersome to work with and more prone to race conditions as people are able to branch off your base at any point in time. However, I think that I’ve seen people using such custom workflows with Changesets - so it’s definitely possible.
While for some projects that extra PR might be redundant - for other projects it’s quite nice as “batching” multiple PRs into one is desirable. Imagine that you’d have two concurrent PRs introducing major changesets for package A. Your intention is probably to release a single major version of your package and not two.
Ok, I’ve finally managed to get this working. It’s a bit hacky but seems reliable: