There must be a use in commerce
Assuming there are no other barriers to trademark protection, you are asking what amounts to a "use in commerce" that is sufficient to warrant trademark protection (I'm assuming in United States law).
In the United States, the protection comes from the Lanham Act, and protection requires "use in commerce". See e.g. International Bancorp, LLC v. Societe des Bains de Mer et du Cercle des Etrangers a Monaco, 329 F.3d 359 (4th Cir. 2003).
This requires "the bona fide use of a mark in the ordinary course of trade, and not made merely to reserve a right in a mark" (15 U.S.C. § 1127).
This does not require a sale and token sales are not determinative
However, "the existence of sale or lack thereof does not by itself determine whether a user of a mark has established owenrship rights therein" (Planetary Motion v. Techplosion, 261 F.3d 1188 (11th Cir. 2001)):
- announcement of a title ("Plasmer") to 13 million comic book readers and promotion at a trade conference was sufficient to establish trademark rights, even without sales
- but a toy manufacturer's promotional efforts were not sufficient—they only made a few presentations and even made one sale to a toy retailer
The talismanic test is whether or not the mark was used "in a way sufficiently public to identify or distinguish the marked goods in an appropriate segment of the public mind as those of the adopter of the mark"
(Windows User, Inc. v. Reed Business Publishing Ltd., 795 F. Supp. 103 (S.D.N.Y. 1992), citing New England Duplicating Co. v. Mendes, 190 F.2d 415, 417 (1st Cir. 1951))
The Court in Planetary Motion says "Courts applying the 'totality of circumstances' approach routinely have found evidence of a few sales of goods to which the mark had been affixed insufficient to establish trademark ownership."
In the particular case in Planetary Motion, the Court found that free distribution of software using the "Coolmail" mark constituted a "use in commerce." The factors they noted were:
- the distribution was widespread
- there was evidence that the public actually associated the mark with the software
- distribution was not limited to a trade show or a group of friends or small circle
- the software was posted and accessible on the internet using the filename bearing "Coolmail"
- users were communicating about the software using the word "Coolmail"
- the software was incorporated into other software that was sold
- the software was distributed under a GNU General Public License—"the sufficiency of use should be determined according to the customary practices of a particular industry"
Application is fact-based, looking at the totality of the circumstances
Applying the principles from above to your hypothetical, the fact that there are not widespread sales would raise an immediate issue that could be argued in litigation. The question would come up as to whether this was a "bona fide use" and not use "made merely to reserve a right in a mark." In my view, the single donation of one dollar would not change anything; nor would even a literal sale of a single shirt. The question would turn on whether the distribution of 100,000 shirts, even without sale, created a connection in the minds of users between the mark and a product (presumably clothing?), and put others on sufficient notice that this mark was to be used in commerce. This is a heavily fact-based inquiry, and on the facts of the hypothetical, we just don't have the information to answer this.