From 6cfccceff53bb8e1dc1ea8549d86b4406e2476d2 Mon Sep 17 00:00:00 2001 From: Sahan He <45299562+sahanHe@users.noreply.github.com> Date: Tue, 27 Feb 2024 19:02:58 +0530 Subject: [PATCH 1/2] Add release configurations to gradle.build --- build.gradle | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/build.gradle b/build.gradle index 72bf93f0..97b0cd80 100644 --- a/build.gradle +++ b/build.gradle @@ -79,3 +79,14 @@ task build { dependsOn("${project.packageName}-native:build") dependsOn("${project.packageName}-ballerina:build") } + +release { + buildTasks = ['build'] + failOnSnapshotDependencies = true + versionPropertyFile = 'gradle.properties' + tagTemplate = 'v${version}' + git { + requireBranch = "release-${moduleVersion}" + pushToRemote = 'origin' + } +} From 6dff06bffb07464ea46295b206ff3fa3b59a94c0 Mon Sep 17 00:00:00 2001 From: Sahan He <45299562+sahanHe@users.noreply.github.com> Date: Tue, 27 Feb 2024 23:08:23 +0530 Subject: [PATCH 2/2] Update build.gradle --- build.gradle | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 97b0cd80..828eecc9 100644 --- a/build.gradle +++ b/build.gradle @@ -34,6 +34,13 @@ allprojects { repositories { mavenLocal() + maven { + url = 'https://maven.wso2.org/nexus/content/repositories/releases/' + } + + maven { + url = 'https://mvnrepository.com/artifact/org.testng/testng' + } maven { url = 'https://maven.wso2.org/nexus/content/groups/wso2-public/' @@ -44,7 +51,7 @@ allprojects { } maven { - url = 'https://maven.pkg.github.com/ballerina-platform/ballerina-lang' + url = 'https://maven.pkg.github.com/ballerina-platform/*' credentials { username System.getenv("packageUser") password System.getenv("packagePAT") @@ -59,6 +66,8 @@ allprojects { } } +def moduleVersion = project.version.replace("-SNAPSHOT", "") + def executeBalCommand(String command, String dir) { try { exec {