I've created the below diagram. I believe it is pretty much self-explanatory, however, I would like to point out a few stuff.
After some self-research and help from this community, my conclusion is:
- For developing Managed package (multi developers) we can use any DevHub Orgs.
- Later on, register the Package Org's namespace prefix on the DeveHub Org.
- Create Scratch Org and develop code based on the namespace prefix.
- Finally, give build to Package Org, from there firstly we need to create a beta Managed Package. Upon successful testing result, build the Released Managed Package.
These are my understandings, please do correct me where I'm wrong or provide me info about a better way.
- Create new Scratch Orgs after every 30 days, Is there a proper way to clone one scratch org to another rather than pushing all the files every time and manually setting up the org? Please provide me resources if possible.
- I believe I can use any ORG for QA testing/DevHub Orgs/Scratch Orgs. Are there any Salesforce recommendations for these ORG types? Suppose I have an enterprise edition production org, I have to create DevHub and other ORG from the Enterprise edition ORG or need to maintain org types for them, something like that?