Try to actively avoid using the term "building a community". You cannot "build" a community. You can only build an environment in which a community can evolve. And that is not easy. But it is possible whereas "building" a community is simply impossible.
There are a lot of great books and articles out there which give hints about what is needed to "build" a community. Go read them if you have to create an environment suitable for a community to grow. And be aware that it is a long, tedious, thankless job with unsure outcome. It is probably a lot easier to become rich.
This article is a good starting point to learn about different aspects of building (the environment in which a) community (will grow):