Skip to content

Commit

Permalink
Modify publish script to publish only :testcontainers: project (core)…
Browse files Browse the repository at this point in the history
… and to just locally publish the artifact.
  • Loading branch information
ZachChuba committed Jan 28, 2025
1 parent af91de4 commit a649a60
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/manual-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,13 @@ jobs:
- name: Run Gradle Build
run: ./gradlew build --scan --no-daemon -i -x test

- name: Create Release Package
- name: Run Gradle Publish
run: |
mkdir -p release
cp build/libs/*.jar release/
cp build/publications/mavenJava/*pom* release/
cp build/libs/*.sources.jar release/
cp build/libs/*.javadoc.jar release/
./gradlew :testcontainers:publish \
-Pversion="${{ github.event.inputs.version }}" --scan --no-daemon -i
- name: Upload Release Artifacts
uses: actions/upload-artifact@v4
with:
name: release-artifacts
path: release/
path: core/build/release-artifact
12 changes: 4 additions & 8 deletions gradle/publishing.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apply plugin: 'maven-publish'

task sourceJar(type: Jar) {
archiveClassifier.set( 'sources')
archiveClassifier.set('sources')
from sourceSets.main.allJava
}

Expand Down Expand Up @@ -57,7 +57,7 @@ publishing {

def dependenciesNode = rootNode.appendNode('dependencies')

def apiDeps= project.configurations.api.resolvedConfiguration.firstLevelModuleDependencies
def apiDeps = project.configurations.api.resolvedConfiguration.firstLevelModuleDependencies
def providedDeps = project.configurations.provided.resolvedConfiguration.firstLevelModuleDependencies
def newApiDeps = apiDeps - providedDeps

Expand Down Expand Up @@ -95,11 +95,7 @@ publishing {
}
repositories {
maven {
url("https://oss.sonatype.org/service/local/staging/deploy/maven2")
credentials {
username = System.getenv("OSSRH_USERNAME")
password = System.getenv("OSSRH_PASSWORD")
}
url = uri("${project(':testcontainers').buildDir}/release-artifact")
}
}
}
}

0 comments on commit a649a60

Please sign in to comment.