I think the easiest solution is to not assert the GH_TOKEN if the build is a pull request Can't we just disable the checks if the repo is not mockito/mockito ? Pull requests always have `mockito/mockito` as repository? No only ours, external contributors have a fork. Since the GH_TOKEN assertion don't fail for our pull request I think this is safe assumption. @szczepiq could you make this high priority on your list? Failing builds discourages external developers from publishing their work
Travis builds from non-core developers fail on assertEnvVariables
Example build: https://travis-ci.org/mockito/mockito/jobs/188911380

Seems that this does not affect core developers, as my build has been succesful: https://travis-ci.org/mockito/mockito/builds/188321204 as well as those in #865 and #859
gradle/root/release.gradle
gradle/root/release.gradle
diff --git a/gradle/root/release.gradle b/gradle/root/release.gradle
index 44d938bc72..821070ff99 100644
--- a/gradle/root/release.gradle
+++ b/gradle/root/release.gradle
@@ -254,10 +254,10 @@ task pushChanges(type: Exec) {
 }
 
 releaseWorkflow {
-    step assertEnvVariables
-    step assertCleanWorkingCopy
     step releaseNeeded
     onlyIf { releaseNeeded.needed }
+    step assertEnvVariables
+    step assertCleanWorkingCopy
     step bintrayUploadAll //TODO make upload task the very last task or very close to push so that the most invasive steps go last
     step pullCommits
     step configureGenericGitUser, [cleanup: restoreGitUser]
