"We have nothing to hide," the US president writes after previously resisting publishing the documents.