From 7c9faede8f39fc6797c1a097d2f7509c46b075b7 Mon Sep 17 00:00:00 2001 From: wolandscat Date: Fri, 5 Apr 2024 15:22:45 -0600 Subject: [PATCH] Local build-related changes. --- .github/workflows/pull-request.yaml | 29 +++++++++++++++++++++++++++++ .github/workflows/push.yaml | 29 +++++++++++++++++++++++++++++ build.gradle | 2 +- gradle/publish-maven.gradle | 12 ++++-------- 4 files changed, 63 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/pull-request.yaml create mode 100644 .github/workflows/push.yaml diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml new file mode 100644 index 000000000..56303ce81 --- /dev/null +++ b/.github/workflows/pull-request.yaml @@ -0,0 +1,29 @@ +name: Gradle Build & Test + +on: + pull_request: + branches: [ "master" ] + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up GraalVM JDK 17 + uses: graalvm/setup-graalvm@v1 + with: + java-version: '17' + distribution: 'graalvm-community' + github-token: ${{ secrets.GITHUB_TOKEN }} + - name: Gradle Build + uses: gradle/gradle-build-action@v2.8.0 + with: + arguments: build + env: + ORG_GRADLE_PROJECT_mavenUser: ${{ github.actor }} + ORG_GRADLE_PROJECT_mavenPassword: ${{ secrets.GITHUB_TOKEN }} + ORG_GRADLE_PROJECT_snapshotsRepoURL: https://maven.pkg.github.com/${{ github.repository }} + ORG_GRADLE_PROJECT_releasesRepoURL: https://maven.pkg.github.com/${{ github.repository }} \ No newline at end of file diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml new file mode 100644 index 000000000..56303ce81 --- /dev/null +++ b/.github/workflows/push.yaml @@ -0,0 +1,29 @@ +name: Gradle Build & Test + +on: + pull_request: + branches: [ "master" ] + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up GraalVM JDK 17 + uses: graalvm/setup-graalvm@v1 + with: + java-version: '17' + distribution: 'graalvm-community' + github-token: ${{ secrets.GITHUB_TOKEN }} + - name: Gradle Build + uses: gradle/gradle-build-action@v2.8.0 + with: + arguments: build + env: + ORG_GRADLE_PROJECT_mavenUser: ${{ github.actor }} + ORG_GRADLE_PROJECT_mavenPassword: ${{ secrets.GITHUB_TOKEN }} + ORG_GRADLE_PROJECT_snapshotsRepoURL: https://maven.pkg.github.com/${{ github.repository }} + ORG_GRADLE_PROJECT_releasesRepoURL: https://maven.pkg.github.com/${{ github.repository }} \ No newline at end of file diff --git a/build.gradle b/build.gradle index 6d831a802..c58bce76b 100644 --- a/build.gradle +++ b/build.gradle @@ -9,7 +9,7 @@ wrapper { allprojects { version = '3.9.1' - group = 'com.nedap.healthcare.archie' + group = 'io.graphitehealth.archie' ext.gradleScriptDir = "${rootProject.projectDir}/gradle" //archivesBaseName = 'archie' diff --git a/gradle/publish-maven.gradle b/gradle/publish-maven.gradle index 33a94ffa0..b8dcd5b20 100644 --- a/gradle/publish-maven.gradle +++ b/gradle/publish-maven.gradle @@ -12,16 +12,12 @@ if(gradle.ext.shouldSign) { publishing { repositories { maven { - name = "ossrh" - // OSSRH URLS - def releasesRepoUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/' - def snapshotsRepoUrl = 'ttps://oss.sonatype.org/content/repositories/snapshots/' - url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl - credentials { - username = project.hasProperty('ossrhUsername') ? ossrhUsername : "Unknown user" - password = project.hasProperty('ossrhPassword') ? ossrhPassword : "Unknown password" + username mavenUser + password mavenPassword } + + url = version.endsWith('SNAPSHOT') ? snapshotsRepoURL : releasesRepoURL } } }