You do not need to wait until you get 臨時綠卡 for your 辭職.
After you get married, you can file I-130 and I-485 together immediately, and then you can resign and your status will be AOS.
After you get married, you can file I-130 and I-485 together immediately, and then you can resign and your status will be AOS.