If you plant a seed shortly before the end of shabbat (zoraya) and then un-bury it after shabbat, or you put an uncooked food into an oven and then take it out within seconds without it having baked (ofeh). Have you transgressed a melacha or not?
One of the principles enumerated by the Tif'eres Yisra'el in Kalkeles Shabbas to be liable is that the mal'achah done has to endure; if it doesn't endure, he is not liable for it (though it is still forbidden). However, he says that for some mel'achos, among them planting, one is liable for them even if it doesn't endure. (I did read in the name of the Aruch that a person is liable for planting even only if it endures; however, I can't remember where I read that and I can't find a reference to that Aruch.)
this is a famous dispute between the Minchas Chinuch and the Rashash in Shabbos (73a)- the Minchas Chinuch says that if one removed the seed before the zriah he is still liable, however the rashash says one is not liable, the rashash compares to the din of baking, that if one stopped the baking before it was finsihed one is not liable for bishul, since the melocho is the finised product of the baking. (see the Iglei Tal on the Minchas Chinuch)
This is the Minchas Chinuch:
In short, no you have not been mechallel shabbos. However there's an issur d'rabonon in both cases. In the case of putting something into the oven, the food has to reach "ochel Ben deurso". Which is about 1/3 cooked in order to violate shabbos. In the case of the seed it's trickier aside from the rabbinic prohibition of handling the seed (because it's muktzeh) it can be more severe. If your intent was to take it out before it sprouted roots, then you wouldn't be obligated to bring a sin offering (meaning it's only a rabbinical prohibition which is under not doing half melachos.) however If your intention was for it to sprout roots then you WOULD have indeed been mechallel shabbos. Because the normal way to seed is to plant seeds into the ground and wait past that day for it to sprout roots.