diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 44d4ec2..a0ca67e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,7 @@ jobs: with: fetch-depth: '0' # https://github.com/shipkit/shipkit-auto-version#fetch-depth-on-ci - name: Run build - run: .\gradlew.bat build --scan --continue + run: .\gradlew.bat build --continue build: @@ -46,15 +46,15 @@ jobs: with: fetch-depth: '0' # https://github.com/shipkit/shipkit-auto-version#fetch-depth-on-ci - name: Run build - run: ./gradlew build --scan --continue + run: ./gradlew build --continue - name: Push tag and deploy to plugins.gradle.org if: github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'shipkit/shipkit-auto-version' && !contains(toJSON(github.event.commits.*.message), '[skip release]') - run: ./gradlew publishPlugins githubRelease --scan + run: ./gradlew publishPlugins githubRelease env: # Gradle env variables docs: https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_environment_variables GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }} GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }} - GH_WRITE_TOKEN: ${{ secrets.GH_WRITE_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/gradle/release.gradle b/gradle/release.gradle index 4f60f58..8d33222 100644 --- a/gradle/release.gradle +++ b/gradle/release.gradle @@ -36,7 +36,7 @@ if (ext.'gradle.publish.key' && ext.'gradle.publish.secret') { tasks.named("generateChangelog") { previousRevision = project.ext.'shipkit-auto-version.previous-tag' - readOnlyToken = "a0a4c0f41c200f7c653323014d6a72a127764e17" + githubToken = System.getenv("GITHUB_TOKEN") repository = "shipkit/shipkit-auto-version" } @@ -45,6 +45,6 @@ tasks.named("githubRelease") { dependsOn genTask repository = genTask.repository changelog = genTask.outputFile - writeToken = System.getenv("GH_WRITE_TOKEN") + githubToken = System.getenv("GITHUB_TOKEN") newTagRevision = System.getenv("GITHUB_SHA") } diff --git a/settings.gradle b/settings.gradle index 8a240ac..cf9200c 100644 --- a/settings.gradle +++ b/settings.gradle @@ -6,7 +6,10 @@ gradleEnterprise { buildScan { termsOfServiceUrl = "https://gradle.com/terms-of-service" termsOfServiceAgree = "yes" - uploadInBackground = System.getenv("CI") == null + if (System.getenv("CI")) { + publishAlways() + uploadInBackground = false + } } }