|
6 | 6 | - v*.*.*-rc.* |
7 | 7 |
|
8 | 8 | jobs: |
9 | | - validatepluginpublication: |
10 | | - runs-on: ubuntu-latest |
11 | | - name: Gradle Plugin Publication Validation |
12 | | - environment: |
13 | | - name: Publish |
14 | | - url: "https://repo1.maven.org/maven2/com/netflix/nebula/gradle-nothing-plugin/" |
15 | | - env: |
16 | | - NETFLIX_OSS_SONATYPE_USERNAME: ${{ secrets.ORG_SONATYPE_USERNAME }} |
17 | | - NETFLIX_OSS_SONATYPE_PASSWORD: ${{ secrets.ORG_SONATYPE_PASSWORD }} |
18 | | - steps: |
19 | | - - uses: actions/checkout@v4 |
20 | | - - name: Setup git user |
21 | | - run: | |
22 | | - git config --global user.name "Nebula Plugin Maintainers" |
23 | | - git config --global user.email "nebula-plugins-oss@netflix.com" |
24 | | - - name: Set up JDKs |
25 | | - uses: actions/setup-java@v4 |
26 | | - with: |
27 | | - distribution: 'zulu' |
28 | | - java-version: | |
29 | | - 17 |
30 | | - 21 |
31 | | - java-package: jdk |
32 | | - - name: Setup Gradle |
33 | | - uses: gradle/actions/setup-gradle@v5 |
34 | | - with: |
35 | | - cache-overwrite-existing: true |
36 | | - - name: Verify plugin publication |
37 | | - if: | |
38 | | - (!contains(github.ref, '-rc.')) |
39 | | - run: ./gradlew --stacktrace -Dgradle.publish.key=${{ secrets.gradlePublishKey }} -Dgradle.publish.secret=${{ secrets.gradlePublishSecret }} -Prelease.useLastTag=true final publishPlugin --validate-only -x check |
40 | 9 | publish: |
41 | | - needs: validatepluginpublication |
42 | 10 | runs-on: ubuntu-latest |
43 | 11 | name: Gradle Build and Publish |
44 | 12 | environment: |
@@ -69,11 +37,12 @@ jobs: |
69 | 37 | uses: gradle/actions/setup-gradle@v5 |
70 | 38 | with: |
71 | 39 | cache-overwrite-existing: true |
| 40 | + - name: Verify plugin publication |
| 41 | + if: (!contains(github.ref, '-rc.')) |
| 42 | + run: ./gradlew --stacktrace -Dgradle.publish.key=${{ secrets.gradlePublishKey }} -Dgradle.publish.secret=${{ secrets.gradlePublishSecret }} -Prelease.useLastTag=true final publishPlugin --validate-only -x check |
72 | 43 | - name: Publish candidate |
73 | | - if: | |
74 | | - contains(github.ref, '-rc.') |
| 44 | + if: contains(github.ref, '-rc.') |
75 | 45 | run: ./gradlew --info --stacktrace -Prelease.useLastTag=true candidate |
76 | 46 | - name: Publish release |
77 | | - if: | |
78 | | - (!contains(github.ref, '-rc.')) |
| 47 | + if: (!contains(github.ref, '-rc.')) |
79 | 48 | run: ./gradlew --stacktrace -Dgradle.publish.key=${{ secrets.gradlePublishKey }} -Dgradle.publish.secret=${{ secrets.gradlePublishSecret }} -Prelease.useLastTag=true final |
0 commit comments