That's a legit fact that you'll quit your job if you can't make money out of it. I had the opposite mindset though. I was in love with programming as I was accepting others' projects without any expectation for income.
I was like.. by finishing this project, I'll be more experienced in distributed systems.. I'll be introduced to X design pattern.. I'll find a chance to work with a NoSQL database in a project so that must be the real value.. not the money. I had no job until then by the way.
I'm not trying to prove that that was not the real value. It obviously is. Your experience of working is one of the most valuable things that you have.
A Short Story About Myself
One day, I realized that my keyboard's wire was broken apart. It was too old as I was kind of expecting that moment to happen sooner or later. I just thought for a second. I've completed so many projects using you (keyboard).. I've been working on lots of codebases. Of course, I've got so much experience but why wouldn't I be able to buy myself a new keyboard just to keep working?! Just to keep this routine.
That was the moment that I was so convinced to quit my dream job, dearest of all time, coding, and look for another job. Something that I could meet my needs with. How romantic.. anyway.
Open Source?! Nah..
One of the main reasons that most developers don't find open-source collaborations interesting is that you can barely find ways of making money from open-source. No doubt, that's true. But just barely.
Here, we want to talk about the ways, you can make money from either developing or maintaining open-source projects.
1. Continue Your Activities on Popular Platforms
There is always a high chance for your projects and repositories to get more views and high engagements if you keep improving them on popular and most-visited platforms. In our case, we have GitHub and GitLab.
Don't expect to get high engagement by working on an unknown platform since there are fewer people hanging around there.
2. Get Sponsored
Before you step into anything new, you better have a social network because you'll then have your audiences. You'll get a certain amount of engagement on any step you take. That's a huge motivation.
There are a few platforms that give you sponsorship abilities. You can set up your account information and get sponsored by others. You can call for sponsorship for either your personal profile or projects.
3. Make Top Projects Rely on Yours
In the open-source world, it's so crucial managing the projects that your repository relies on. In other words, you have to take care of your project's dependencies. I've seen so many maintainers that not only keep improving their main projects but also contribute to their projects' dependencies just to ensure they won't die.
Every existing issue in your project's dependencies should be a critical concern for your project. That's why releases take longer in massive frameworks.
Most high-ranked companies support the projects that their services are related to. If you make a new web framework and company X decides to use your framework, since they have to put effort to design their service based on your framework, it'll be so costly for them to change their codebases and migrate to another framework so they support your framework financially to keep you updating your framework. That'll be way more cost-effective than migrating the whole codebase for them.
There is an ideology for managing dependencies. It advises keeping as fewer as possible dependencies associated with your project. Unfortunately, it makes it harder for your projects to get used by others unless you've nailed it and there is no way for them but to keep up with your project.
4. Try Getting Promotions on Open-source Projects
By getting promotions on the already-supported repositories, you can take financial benefits by working on open-source projects. Although it's tough and requires a consistent contribution to the project, you can get paid by working on popular projects.
5. Paid-plan on Your Open-source Projects
One of the coolest solutions is to implement a paid plan for your personal projects. You can have accounting integrations with some third parties such as PayPal or Stripe in your project and give access based on the payments. It's not essentially related to the open-source but the Premium/Pro/Professional implementation part of your project can be kept developing privately which is not open-source anymore actually.
6. Become a Bug-bounty Hunter
Bug-bounty hunting has been a trending title lately. You can get paid by finding and/or fixing critical bugs or vulnerability issues of a product or service. There are still companies that offer money for reporting security bugs.
There is a worth-reading history behind this title. I highly recommend you read the ways that big companies deal with this subject. Read the following wiki. It might change your point of view.
Conclusion
In this article, we talked about the ways you can get sponsored and make money from open source via either contributing, developing, or maintaining the projects. Hope this one has helped you find your favorite job and keep grinding!