Skip to content

Commit

Permalink
Local build-related changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
wolandscat committed Apr 5, 2024
1 parent ab7b2b1 commit 7c9faed
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 9 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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 }}
29 changes: 29 additions & 0 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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 }}
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
12 changes: 4 additions & 8 deletions gradle/publish-maven.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
Expand Down

0 comments on commit 7c9faed

Please sign in to comment.