Skip to content

Commit 99d1f00

Browse files
committed
update publish action to use environment
1 parent 3fa74a5 commit 99d1f00

File tree

2 files changed

+9
-31
lines changed

2 files changed

+9
-31
lines changed

.github/workflows/publish.yml

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,38 +6,13 @@ on:
66
- v*.*.*-rc.*
77

88
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 "nebula-plugins-oss@netflix.com"
21-
- name: Set up JDKs
22-
uses: actions/setup-java@v4
23-
with:
24-
distribution: 'zulu'
25-
java-version: |
26-
17
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
369
publish:
3710
if: github.event.base_ref == 'refs/heads/main' # tags must be pushed to main
38-
needs: validatepluginpublication
3911
runs-on: ubuntu-latest
4012
name: Gradle Build and Publish
13+
environment:
14+
name: Publish
15+
url: "https://plugins.gradle.org/plugin/com.netflix.nebula.plugin-plugin"
4116
env:
4217
NETFLIX_OSS_SONATYPE_USERNAME: ${{ secrets.ORG_SONATYPE_USERNAME }}
4318
NETFLIX_OSS_SONATYPE_PASSWORD: ${{ secrets.ORG_SONATYPE_PASSWORD }}
@@ -65,6 +40,9 @@ jobs:
6540
cache-overwrite-existing: true
6641
- name: Gradle build
6742
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
6846
- name: Publish candidate
6947
if: contains(github.ref, '-rc.')
7048
run: ./gradlew --stacktrace -Prelease.useLastTag=true candidate

gradle.lockfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ com.jayway.jsonpath:json-path:2.7.0=testCompileClasspath,testRuntimeClasspath
3535
com.jcraft:jzlib:1.1.2=runtimeClasspath
3636
com.jcraft:jzlib:1.1.3=testCompileClasspath,testRuntimeClasspath
3737
com.lmax:disruptor:3.4.4=testCompileClasspath,testRuntimeClasspath
38-
com.netflix.nebula:gradle-contacts-plugin:8.0.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
38+
com.netflix.nebula:gradle-contacts-plugin:8.1.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
3939
com.netflix.nebula:gradle-dependency-lock-plugin:16.1.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
4040
com.netflix.nebula:gradle-info-plugin:16.0.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
4141
com.netflix.nebula:gradle-java-cross-compile-plugin:8.0.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
42-
com.netflix.nebula:nebula-archrules-core:0.2.3=runtimeClasspath,testRuntimeClasspath
43-
com.netflix.nebula:nebula-archrules-gradle-plugin:0.2.3=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
42+
com.netflix.nebula:nebula-archrules-core:0.3.0=runtimeClasspath,testRuntimeClasspath
43+
com.netflix.nebula:nebula-archrules-gradle-plugin:0.3.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
4444
com.netflix.nebula:nebula-dependencies-comparison:0.2.1=runtimeClasspath,testRuntimeClasspath
4545
com.netflix.nebula:nebula-gradle-interop:3.1.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
4646
com.netflix.nebula:nebula-oss-publishing-plugin:4.1.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath

0 commit comments

Comments
 (0)