Move the check for latest hash to after publishSigned

Apparently the before-publish hooks I was using are needed
for offlineTests and integrationTests too.