All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
Masturbation is the intentional release of semen by any means.
The Fiqh Encyclopedia reads: “Masturbation is the release of semen without intercourse; in masturbation, it is necessary that one causes the release of semen (i.e. ejaculates), while awake by some kind of means.” [End of quote]
Based on the above, what you have done is considered causing the semen to be released deliberately, because you caused ejaculation. If you were not fasting then the expiation for your action is to repent to Allah Almighty sincerely, and not return to this sin.
If you were fasting, then in addition to sincere repentance, you must make up that day without any expiation, based on the opinion we consider to be the most preponderant one.
For more benefit on the prohibition of masturbation, please refer to Fatwa 376036.
Allah Knows best.