I already saw the YAML that you posted (with bad formatting, but I suspect that's a problem with google groups).
The link above describes the extra field that you need:
years:
[ - <year_range> ...]
and it also says:
year_range: A numerical list of years. Ranges are accepted. For example, ['2020:2022', '2030']. Inclusive on both ends.
What's unclear about that? Or have you tried it, and found that it doesn't work?
I still think that Silences are really what you want. If you want a history of silences in git, then you can write a tool which syncs your silences defined in git via the Alertmanager API. Unfortunately the API is
not properly documented but you could look at the source of alertmanager, or other clients which manage silences like
karma.