Skip to content

Commit

Permalink
Merge 0497ff6 into dbd88ea
Browse files Browse the repository at this point in the history
  • Loading branch information
pkgajulapalli authored Oct 1, 2024
2 parents dbd88ea + 0497ff6 commit aed05fa
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 6 deletions.
23 changes: 19 additions & 4 deletions .github/workflows/build-jar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,22 @@ jobs:
- name: Set input tag
run: echo "INPUT_TAG=${{ inputs.tags }}" >> $GITHUB_ENV

- name: Upload JAR files to Release
- name: Publish with Gradle
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
branch_name=$(git rev-parse --abbrev-ref HEAD)
if [[ "$branch_name" == "release-v"* ]]; then
version_number=${branch_name:9}
echo "Publishing release branch"
./gradlew publish -PbuildRelease=true -Pversion=${version_number}
else
echo "Publishing snapshot release"
./gradlew publish -Pversion="0.0.${{ github.event.pull_request.number }}-SNAPSHOT"
fi
- name: Upload lakeview jar file to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -47,7 +62,7 @@ jobs:
asset_name: LakeView-${{ env.INPUT_TAG }}-all.jar
asset_content_type: application/java-archive

- name: Upload JAR files to Release
- name: Upload lakeview source jar file to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -57,7 +72,7 @@ jobs:
asset_name: LakeView-${{ env.INPUT_TAG }}-sources.jar
asset_content_type: application/java-archive

- name: Upload JAR files to Release
- name: Upload lakeview-glue jar file to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -67,7 +82,7 @@ jobs:
asset_name: lakeview-glue-${{ env.INPUT_TAG }}-all.jar
asset_content_type: application/java-archive

- name: Upload JAR files to Release
- name: Upload lakeview-glue source jar file to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
25 changes: 23 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ sonar {
property "sonar.pullrequest.key", project.getProperty("pullrequest_key")
property "sonar.pullrequest.branch", project.getProperty("pullrequest_branch")
property "sonar.pullrequest.base", project.getProperty("pullrequest_base")
property "sonar.pullrequest.github.repository", "https://github.com/onehouseinc/gateway-controller"
property "sonar.pullrequest.github.repository", "https://github.com/onehouseinc/LakeView"
} else {
property "sonar.branch.name", project.getProperty("branch_name")
}
Expand All @@ -84,7 +84,7 @@ tasks.getByPath('sonar').setDependsOn([])
tasks.getByPath('sonar').setMustRunAfter([])

group = 'ai.onehouse'
version = '1.0-SNAPSHOT'
version = project.hasProperty('version') ? project.version : '1.0-SNAPSHOT'

repositories {
mavenCentral()
Expand All @@ -105,6 +105,7 @@ subprojects {
apply plugin: 'application'
apply plugin: 'io.freefair.lombok'
apply plugin: 'com.diffplug.spotless'
apply plugin: "maven-publish"

compileJava {
options.compilerArgs << '-Xlint:unchecked'
Expand All @@ -118,6 +119,26 @@ subprojects {
}

build.dependsOn sourceJar

publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/onehouseinc/LakeView")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
publications {
mavenJava(MavenPublication) {
groupId 'ai.onehouse'
artifactId project.name
version = project.version
}
}
}
}

// Configure Shadow plugin
Expand Down

0 comments on commit aed05fa

Please sign in to comment.