Commit 37eb969d authored by Him188's avatar Him188

Add bintray availability check

parent 34a24f5d
......@@ -26,6 +26,8 @@ jobs:
run: ./gradlew clean
- name: Gradle build
run: ./gradlew build # if test's failed, don't publish
- name: Check keys
run: ./gradlew :mirai-core:ensureBintrayAvailable :mirai-core-qqandroid:ensureBintrayAvailable
- name: Gradle :mirai-core:bintrayUpload
run: ./gradlew :mirai-core:bintrayUpload -Dbintray_user=${{ secrets.BINTRAY_USER }} -Pbintray_user=${{ secrets.BINTRAY_USER }} -Dbintray_key=${{ secrets.BINTRAY_KEY }} -Pbintray_key=${{ secrets.BINTRAY_KEY }}
- name: Gradle :mirai-core-qqandroid:bintrayUpload
......
......@@ -3,6 +3,11 @@ import upload.Bintray
// 部分源码来自 kotlinx.coroutines
// Source code from kotlinx.coroutines
task ensureBintrayAvailable() {
if (!Bintray.isBintrayAvailable(project)) {
throw new IllegalStateException("bintray isn't available. ")
}
}
if (!Bintray.isBintrayAvailable(project)) {
println("bintray isn't available. NO PUBLICATIONS WILL BE SET")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment