diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index eb9b81db..546705c2 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -18,11 +18,18 @@ jobs: java-version: '17' distribution: 'zulu' - uses: gradle/gradle-build-action@v2 - - name: Run :publishShadowPlugin task - run: ./gradlew :plugin:publishShadowPluginToMarketplace publishAllPublicationsToSpaceRepository + - name: Run :publishShadowPluginToMarketplace task + run: ./gradlew publishAllPublicationsToSpaceRepository :plugin:publishPluginToMarketplace env: MARKETPLACE_TOKEN: ${{ secrets.MARKETPLACE_TOKEN }} GRADLE_ENTERPRISE_KEY: ${{ secrets.GRADLE_ENTERPRISE_KEY }} MAVEN_SPACE_PASSWORD: ${{ secrets.MAVEN_SPACE_PASSWORD }} MAVEN_SPACE_USERNAME: ${{ secrets.MAVEN_SPACE_USERNAME }} CHANGE_NOTES: ${{ github.event.release.body }} + - name: Run :publishStablePluginToTBE task + run: ./gradlew :plugin:publishReleasePluginToTBE + env: + KMP: true + TOOLBOX_ENTERPRISE_TOKEN: ${{ secrets.TOOLBOX_ENTERPRISE_TOKEN }} + GRADLE_ENTERPRISE_KEY: ${{ secrets.GRADLE_ENTERPRISE_KEY }} + CHANGE_NOTES: ${{ github.event.release.body }} diff --git a/.github/workflows/publish-snapshot.yml b/.github/workflows/publish-snapshot.yml index dbdbd26f..45bae6b0 100644 --- a/.github/workflows/publish-snapshot.yml +++ b/.github/workflows/publish-snapshot.yml @@ -20,7 +20,7 @@ jobs: cache: gradle - uses: gradle/gradle-build-action@v2 - name: Run :publishShadowPlugin task - run: ./gradlew :plugin:publishShadowPlugin publishAllPublicationsToSpaceRepository + run: ./gradlew :plugin:publishSnapshotPluginToTBE publishAllPublicationsToSpaceRepository env: TOOLBOX_ENTERPRISE_TOKEN: ${{ secrets.TOOLBOX_ENTERPRISE_TOKEN }} GRADLE_ENTERPRISE_KEY: ${{ secrets.GRADLE_ENTERPRISE_KEY }} diff --git a/plugin/build.gradle.kts b/plugin/build.gradle.kts index 316b3e7b..5c8f3879 100644 --- a/plugin/build.gradle.kts +++ b/plugin/build.gradle.kts @@ -138,17 +138,27 @@ tasks { destinationDirectory = layout.buildDirectory.dir("distributions") } - register("publishShadowPlugin") { + register("publishSnapshotPluginToTBE") { group = "publishing" distributionFile = buildShadowPlugin.flatMap { it.archiveFile } toolboxEnterprise = true host = "https://tbe.labs.jb.gg/" token = project.properties["toolboxEnterpriseToken"]?.toString() ?: getenv("TOOLBOX_ENTERPRISE_TOKEN") - channels = listOf("Snapshots") + channels = listOf("Snapshot") } - register("publishShadowPluginToMarketplace") { + register("publishReleasePluginToTBE") { + group = "publishing" + distributionFile = buildShadowPlugin.flatMap { it.archiveFile } + toolboxEnterprise = true + host = "https://tbe.labs.jb.gg/" + token = project.properties["toolboxEnterpriseToken"]?.toString() + ?: getenv("TOOLBOX_ENTERPRISE_TOKEN") + channels = listOf("Release") + } + + register("publishPluginToMarketplace") { group = "publishing" distributionFile = buildShadowPlugin.flatMap { it.archiveFile } token = project.properties["marketplaceToken"]?.toString()