Historically, Militia forces in the colonies were much loved and glorified because of the very common anti-military stance that was a hold over from the English. This anti-militarism did not extend to the navy it is also worth noting. When the English would plan an expedition for example, they would not call up militia but set a quota for settlements and territories because the militias often drilled only once per year and were widely regarded by the English as poor soldiers. The Militia did not actually play a large role in the American revolution, in fact the majority of the troops did not sign on to fight for the duration but instead just a single year with many deserting before their terms were up. The Rage militaire, a kind of general calling for righteous conflict, that sprung up after the declaration of Independence pretty quickly dissipated as well and the Continental army was constantly under quota and undermanned. To answer your question, the revolution was won by the continental army and the amount of men whom were militia operating on their own was negligible. If you would like to know more about this subject, my sources listed below are easily readable and neither is very long.
Sources cited
Millett, Allan Reed., et al. For the Common Defense: a Military History of the United States of America from 1607 to 2012. Free Press, 2012.
Royster, Charles. A Revolutionary People at War: the Continental Army and American Character, 1775-1783. Published for the Omohundro Institute of Early American History and Culture, Williamsburg, Virgini, by the University of North Carolina Press, 2015.
You describe the popular perception well as "a victory of persistent and wily citizen-riflemen against a professional military." In reality, the Revolutionary militia played a smaller role than popular culture suggests. As John Waghelstein puts it, "What really won the war was a constantly changing mix of regulars, militia and irregulars..."
Soldiering is hard. This has always been the case. It doesn't require much thought to cast doubt on the idea of calling everyday people into the heat of battle and expecting them to perform at the level of professional soldiers. There were occassional militia musters, but they could not achieve the same effectiveness as those of the army. As Harold Selesky writes, "Many militiamen fancied themselves as soldiers because they could play on the parade ground without the slightest danger of being called to fight." If you're interested in this topic, I highly suggest Michael Bellesiles' book Arming America, which tackles the militia myth at length using primary sources. Bellesiles looks at the 17th century English antecedents to the American militia and comes away with the following conclusion: "This attractive ideal--a well armed citizenry ready to rise up in defense of the nation--had no basis in reality." While there were some battlefield victories involving the militia, the American Revolution was not won solely by scrappy American everymen leaving their day jobs to fight and then returning to work.
Beyond the lack of training, during the Revolutionary War, most colonists did not own firearms and many of the firearms that were in private hands were not in operating condition. Bellesiles again: "It is certainly true that thusands of Americans rushed forth to confront the British Empire in 1775, but they showed up for service largely empty-handed. Not surprisingly, volunteers expected the new government of the United Colonies to supply them with firearms, as was the norm then and now. Over the next eight years, virtually every militia muster and every officer's report on the question of armaments presented the same complaint: their soldiers needed guns and training in their use." Bellesiles claims that most Americans did not own a gun during the Revolutionary period. Historian Robert Churchill claims that ownership numbers were much higher, but still nowhere near 100%. In either case, Robert Smith's conclusion seems correct that "The American colonies that rebelled against Great Britain in 1775 did so without the weapons manufacturing infrastructure necessary to support such an action."
I'll give Bellesiles the last word: "The experience of fighting the war destroyed the myth of the universal militia for Madison, as for most Revolutionary leaders. in the aftermath of Concorde... thousands of Americans imagined that their virtue and the militia would crush the British and bring peace on American terms. The vision of 'A people numerous and armed' has haunted the United States ever since... The enthusiasm for the struggle was certainly there, but the guns were not."
Sources
Bellesiles, Michael A.; Arming America: The ORigins of a National Gun Culture
Churchill, Robert H.; Gun Ownership in Early America: A Survey of Manuscript Militia Returns; The William and Mary Quarterly
Selesky, Harold E.; War and Society in Colonial Connecticut; https://books.google.com/books/about/War_and_Society_in_Colonial_Connecticut.html?id=JBlmQgAACAAJ
Smith, Robert F.; “A veritable… arsenal” of manufacturing: Government management of weapons production in the American Revolution; PhD dissertaion
Waghelstein, John D.; Regulars, Irregulars, and Militia: The American Revolution; https://www.tandfonline.com/doi/pdf/10.1080/09592319508423106