The modification and assembly of proteins in the endoplasmic reticulum.