The fixation of cooperation among unrelated individuals is one of the fundamental problems in biology and social sciences. It is investigated by means of public goods games, the generalization of the prisoner's dilemma to more than two players. In compulsory public goods games, defect is the dominant strategy, while voluntary participation overcomes the social dilemma by allowing a cyclic coexistence of cooperators, defectors, and non-participants. [...] a milder punishing mechanism, where defectors only risk a fixed penalty per round—as in many real situations—and the cost of punishment is shared among the punishers. The payoffs for the four strategies—cooperate, defect, abstain, and cooperate-&-punish—are derived and the corresponding replicator dynamics analyzed in full detail.