Skip to content

Commit

Permalink
Add Gradle task for GitHub package publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuvindu committed Sep 29, 2024
1 parent a6dd0e4 commit 211f548
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
20 changes: 19 additions & 1 deletion ballerina/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,30 @@ task commitTomlFiles {
}
}

publishing {
publications {
maven(MavenPublication) {
artifact source: createArtifactZip, extension: 'zip'
}
}
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/ballerina-platform/module-${packageOrg}-${packageName}")
credentials {
username = System.getenv("publishUser")
password = System.getenv("publishPAT")
}
}
}
}

clean {
delete 'build'
}

build.dependsOn "generatePomFileForMavenPublication"
build.dependsOn copyToLib

build.dependsOn ":${packageName}-native:build"
test.dependsOn ":${packageName}-native:build"

Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pluginManagement {
}

plugins {
id "com.gradle.enterprise" version "3.13.2"
id "com.gradle.enterprise" version "3.2"
}

def projectName = 'confluent.cregistry'
Expand Down

0 comments on commit 211f548

Please sign in to comment.