Let a be the first term and d the common difference between consecutive terms. Then the next few terms in the sequence are
a + d
a + 2d
a + 3d
and so on, up to the k-th term
a + (k - 1) d
The sum of the first n terms of this sequence is

Expanding the sum, we have

It follows that
a - d/2 = 12
d/2 = -2
Solve these equations for a and d.
d/2 = -2 ==> d = -4
a - d/2 = a + 2 = 12 ==> a = 10
So the sequence is
10, 6, 2, -2, -6, -10, -14, …