From 724d8940f8651410e14184f2046f6fbfa6bd7563 Mon Sep 17 00:00:00 2001 From: Him188 Date: Tue, 10 Nov 2020 09:06:27 +0800 Subject: [PATCH] Update publisher --- .../{gradle-build.yml => Gradle CI.yml} | 0 .github/workflows/Publishing.yml | 4 ++ .github/workflows/TagRelease.yml | 2 +- .github/workflows/cui.yml | 48 ------------------- .github/workflows/shadow.yml | 48 ------------------- buildSrc/src/main/kotlin/PublishingHelpers.kt | 4 ++ 6 files changed, 9 insertions(+), 97 deletions(-) rename .github/workflows/{gradle-build.yml => Gradle CI.yml} (100%) delete mode 100644 .github/workflows/cui.yml delete mode 100644 .github/workflows/shadow.yml diff --git a/.github/workflows/gradle-build.yml b/.github/workflows/Gradle CI.yml similarity index 100% rename from .github/workflows/gradle-build.yml rename to .github/workflows/Gradle CI.yml diff --git a/.github/workflows/Publishing.yml b/.github/workflows/Publishing.yml index 12a8e5450..dc365bd7f 100644 --- a/.github/workflows/Publishing.yml +++ b/.github/workflows/Publishing.yml @@ -5,6 +5,10 @@ name: Bintray Publish # Controls when the action will run. Triggers the workflow on push or pull request # events but only for the master branch on: + push: + # Sequence of patterns matched against refs/tags + tags: + - '*-dev*' release: types: - created diff --git a/.github/workflows/TagRelease.yml b/.github/workflows/TagRelease.yml index 0e8c32947..feb32bf72 100644 --- a/.github/workflows/TagRelease.yml +++ b/.github/workflows/TagRelease.yml @@ -8,7 +8,7 @@ on: push: # Sequence of patterns matched against refs/tags tags: - - '*-dev*' # Push events to matching v*, i.e. v1.0, v20.15.10 + - '*-dev*' jobs: build: diff --git a/.github/workflows/cui.yml b/.github/workflows/cui.yml deleted file mode 100644 index eee6c4ecb..000000000 --- a/.github/workflows/cui.yml +++ /dev/null @@ -1,48 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: CuiCloud Publish - -# Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the master branch -on: - release: - types: - - created - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 - with: - java-version: 1.8 - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - name: Gradle clean - run: ./gradlew clean - - name: Gradle build - run: ./gradlew build # if test's failed, don't publish - - name: Gradle :mirai-console:cuiCloudUpload - run: ./gradlew :mirai-console:cuiCloudUpload -Dcui_cloud_key=${{ secrets.CUI_CLOUD_KEY }} -Pcui_cloud_key=${{ secrets.CUI_CLOUD_KEY }} -Dcui_cloud_url=${{ secrets.CUI_CLOUD_URL }} -Pcui_cloud_url=${{ secrets.CUI_CLOUD_URL }} - - name: Gradle :mirai-console-graphical:cuiCloudUpload - run: ./gradlew :mirai-console-graphical:cuiCloudUpload -Dcui_cloud_key=${{ secrets.CUI_CLOUD_KEY }} -Pcui_cloud_key=${{ secrets.CUI_CLOUD_KEY }} -Dcui_cloud_url=${{ secrets.CUI_CLOUD_URL }} -Pcui_cloud_url=${{ secrets.CUI_CLOUD_URL }} - - -# - name: Upload artifact -# uses: actions/upload-artifact@v1.0.0 -# with: -# # Artifact name -# name: mirai-core -# # Directory containing files to upload -# path: "mirai-core/build/libs/mirai-core-*-all.jar" -# - name: Upload artifact -# uses: actions/upload-artifact@v1.0.0 -# with: -# # Artifact name -# name: mirai-core-qqandroid-all -# # Directory containing files to upload -# path: "mirai-core-qqandroid/build/libs/mirai-core-qqandroid-*-all.jar" diff --git a/.github/workflows/shadow.yml b/.github/workflows/shadow.yml deleted file mode 100644 index 4b52408e7..000000000 --- a/.github/workflows/shadow.yml +++ /dev/null @@ -1,48 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: mirai-repo Publish - -# Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the master branch -on: - release: - types: - - created - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 - with: - java-version: 1.8 - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - name: Gradle clean - run: ./gradlew clean - - name: Gradle build - run: ./gradlew build # if test's failed, don't publish - - name: Gradle :mirai-console:githubUpload - run: ./gradlew :mirai-console:githubUpload -Dgithub_token=${{ secrets.MAMOE_TOKEN }} -Pgithub_token=${{ secrets.MAMOE_TOKEN }} - - name: Gradle :mirai-console-terminal:githubUpload - run: ./gradlew :mirai-console-terminal:githubUpload -Dgithub_token=${{ secrets.MAMOE_TOKEN }} -Pgithub_token=${{ secrets.MAMOE_TOKEN }} - - -# - name: Upload artifact -# uses: actions/upload-artifact@v1.0.0 -# with: -# # Artifact name -# name: mirai-core -# # Directory containing files to upload -# path: "mirai-core/build/libs/mirai-core-*-all.jar" -# - name: Upload artifact -# uses: actions/upload-artifact@v1.0.0 -# with: -# # Artifact name -# name: mirai-core-qqandroid-all -# # Directory containing files to upload -# path: "mirai-core-qqandroid/build/libs/mirai-core-qqandroid-*-all.jar" diff --git a/buildSrc/src/main/kotlin/PublishingHelpers.kt b/buildSrc/src/main/kotlin/PublishingHelpers.kt index 8b695c9ef..65414a697 100644 --- a/buildSrc/src/main/kotlin/PublishingHelpers.kt +++ b/buildSrc/src/main/kotlin/PublishingHelpers.kt @@ -84,6 +84,10 @@ inline fun Project.setupPublishing( user = Bintray.getUser(project) key = Bintray.getKey(project) + + publish = true + override = true + setPublications("mavenJava") setConfigurations("archives")