* Adjective: When describing something that happens or is done once a year, such as "a yearly checkup."
* Adverb: When modifying a verb, adjective, or another adverb to indicate frequency, such as "The magazine is published yearly."
So, the part of speech of "yearly" is determined by its usage in the sentence.