From bb0fcce22cb7cb513a8776c767e8e8f8482fc4f1 Mon Sep 17 00:00:00 2001 From: Rahul Somasunderam Date: Sat, 7 Mar 2020 15:56:15 -0800 Subject: [PATCH] Publish snapshot on every push to master --- .editorconfig | 2 ++ .github/workflows/pr.yml | 2 +- .github/workflows/push.yml | 11 ++++++++++- build.gradle | 3 ++- grooves-docs/build.gradle | 2 +- 5 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.editorconfig b/.editorconfig index da570e37a..cbd7b42d1 100644 --- a/.editorconfig +++ b/.editorconfig @@ -6,3 +6,5 @@ indent_style=space indent_size=4 continuation_indent_size=8 +[*.yml] +indent_size=2 diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 8f39fc443..6f0cc4676 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -19,4 +19,4 @@ jobs: with: java-version: 1.8 - name: Build with Gradle - run: ./gradlew build + run: ./gradlew build asciidoctor diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 294b23a54..c61d86bd1 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -19,4 +19,13 @@ jobs: with: java-version: 1.8 - name: Build with Gradle - run: ./gradlew build + run: | + mkdir -p ~/.gradle + echo "nexusUsername=$NEXUS_USER" >> ~/.gradle/gradle.properties + echo "nexusPassword=$NEXUS_PASSWORD" >> ~/.gradle/gradle.properties + ./gradlew build snapshot --stacktrace + env: + NEXUS_USER: rahulsom + NEXUS_PASSWORD: ${{secrets.NEXUS_PASSWORD}} + GRGIT_USER: ${{secrets.GITHUB_TOKEN}} + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} \ No newline at end of file diff --git a/build.gradle b/build.gradle index f2bba5976..2b98d854c 100644 --- a/build.gradle +++ b/build.gradle @@ -54,7 +54,8 @@ subprojects { gradle.releasable.each { tasks.release.dependsOn "grooves-${it}:uploadArchives" } -tasks.release.dependsOn 'grooves-docs:gitPublishPush' +tasks.getByName('final').dependsOn 'grooves-docs:gitPublishPush' +tasks.getByName('candidate').dependsOn 'grooves-docs:gitPublishPush' project.afterEvaluate { gradle.releasable.each { diff --git a/grooves-docs/build.gradle b/grooves-docs/build.gradle index d82d45a1e..4d2505f71 100644 --- a/grooves-docs/build.gradle +++ b/grooves-docs/build.gradle @@ -4,7 +4,7 @@ buildscript { } dependencies { classpath "org.ajoberstar:gradle-git-publish:2.1.3" - classpath "org.asciidoctor:asciidoctor-gradle-plugin:1.6.1" + classpath "org.asciidoctor:asciidoctor-gradle-plugin:1.5.3" } }