what can I do? Will the law protect my pregnancy?

So about a couple weeks ago when I first found out I was pregnant I told my boss that I couldn't do heavy lifting because I was pregnant. I work overnight and that's the main The I do but not the only thing. After being harassed and told I'm a weak pregnant woman they have me doing easy stuff instead of strengious stuff. I've ever gone to the emergency room once this week for terrible cramps. Today a supervisor who knows I'm pregnant put me on the truck line, where I have to scan boxes every second and check them in for inventory as they come off the truck. It requires you to be fast and running around , almost getting hit my heavy boxes. I was being yelled at for not being fast enough and my body started getting so hot that I almost threw up and get dizzy and felt like I was going to constantly pass out. A coworker said he would take over after I told him how I was getting sick on the fact that I was pregnant. The higher boss said it's okay just let her do it. Who the hell is he to tell anyone that I am okay after I'm clearly not! In rage I took off and found our new manager telling him what happened. He told me to talk to HR and see if they can move me to days. But what if they don't? Am I forced to quit? Also I mentioned that I was so stressed that they made me do that and wanted to go home for the night but he just said go rest for a few minutes and we will put you on an easier job. What can I do? I feel unprotected and like my pregnancy is a burden on my coworkers who don't care.