<p style='text-indent:20px;'>In this paper, we first introduce a class of cyclic codes and their related linear codes which are affine-invariant. Then we obtain infinite families of 2-designs from the affine-invariant codes. And the parameters of the 2-designs are determined by considering the weight distribution of the linear codes.</p>