Skip to content

Commit

Permalink
Nebula Plugin Plugin 20.7.4 and add plugin publishing validation
Browse files Browse the repository at this point in the history
  • Loading branch information
rpalcolea committed Apr 7, 2023
1 parent 7e69458 commit 1f549f7
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 3 deletions.
37 changes: 35 additions & 2 deletions .github/workflows/nebula.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
# test against latest update of some major Java version(s), as well as specific LTS version(s)
java: [ 8, 11, 17 ]
java: [ 8, 11 , 17]
name: Gradle Build without Publish
steps:
- uses: actions/checkout@v1
Expand Down Expand Up @@ -56,10 +56,43 @@ jobs:
run: ./gradlew --info --stacktrace build
env:
JDK_VERSION_FOR_TESTS: ${{ matrix.java }}
publish:
validatepluginpublication:
if: startsWith(github.ref, 'refs/tags/v')
needs: validation
runs-on: ubuntu-latest
name: Gradle Plugin Publication Validation
env:
NETFLIX_OSS_SONATYPE_USERNAME: ${{ secrets.ORG_SONATYPE_USERNAME }}
NETFLIX_OSS_SONATYPE_PASSWORD: ${{ secrets.ORG_SONATYPE_PASSWORD }}
steps:
- uses: actions/checkout@v1
- name: Setup jdk 8
uses: actions/setup-java@v1
with:
java-version: 1.8
- uses: actions/cache@v1
id: gradle-cache
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/gradle/dependency-locks/*.lockfile') }}
restore-keys: |
- ${{ runner.os }}-gradle-
- uses: actions/cache@v1
id: gradle-wrapper-cache
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradlewrapper-${{ hashFiles('gradle/wrapper/*') }}
restore-keys: |
- ${{ runner.os }}-gradlewrapper-
- name: Verify plugin publication
if: |
startsWith(github.ref, 'refs/tags/v') &&
(!contains(github.ref, '-rc.'))
run: ./gradlew --stacktrace -Dgradle.publish.key=${{ secrets.gradlePublishKey }} -Dgradle.publish.secret=${{ secrets.gradlePublishSecret }} -Prelease.useLastTag=true final publishPlugin --validate-only -x check -x signPluginMavenPublication
publish:
if: startsWith(github.ref, 'refs/tags/v')
needs: validatepluginpublication
runs-on: ubuntu-latest
name: Gradle Build and Publish
env:
NETFLIX_OSS_SONATYPE_USERNAME: ${{ secrets.ORG_SONATYPE_USERNAME }}
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


plugins {
id 'com.netflix.nebula.plugin-plugin' version '20.5.0'
id 'com.netflix.nebula.plugin-plugin' version '20.7.4'
}

compileGroovy.groovyOptions.configurationScript = file('src/groovyCompile/groovycConfig.groovy')
Expand Down

0 comments on commit 1f549f7

Please sign in to comment.