I usually commit and push before publishing. I guess the order doesn't really matter; npm doesn't care.