Do you choose the IRS address for submitting your federal taxes based on where you currently live (the return address on the envelope) or where your current resident was in that tax year?
Choose the address based on where you currently live (where you are mailing the tax return from.)
You can find the correct mailing address here. Just choose the state you live in, and the website will give you the correct mailing address.
If you get it wrong, I don't think it matters a whole lot, except perhaps to delay things a little bit. They just assign different addresses to different states to try to divide up the returns among the various offices evenly.