Mr. Trump announced on social media that he had signed the legislation, but the release of all the files is not guaranteed.