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