Skip to content

Commit

Permalink
Merge pull request #63 from shestee/config-update
Browse files Browse the repository at this point in the history
Update workflow configuration
  • Loading branch information
mockitoguy authored Dec 29, 2020
2 parents aaecc65 + f747af1 commit 9b6fe7a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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 }}
4 changes: 2 additions & 2 deletions gradle/release.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand All @@ -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")
}
5 changes: 4 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}

Expand Down

0 comments on commit 9b6fe7a

Please sign in to comment.