Because the skating occurred in the past (yesterday) and is finished, and the 6 years passed before yesterday, you must use the past perfect
You can use the continuous tense or the simple perfect tense depending on whether you want to stress the real action going on for some time (continuous) or simply the fact that you skated (simple perfect).
Until yesterday I hadn't been ice-skating for 6 years.
I hadn't gone ice-skating for 6 years until yesterday.
-from the expression "to go ice-skating"
I hadn't ice-skated for 6 years until yesterday