From 44700f606ea6978b865c39513ce118557ac64ef8 Mon Sep 17 00:00:00 2001 From: Fred Deniger Date: Tue, 23 Apr 2024 12:01:18 +0200 Subject: [PATCH] add github actions --- .github/workflows/maven.yml | 10 +++++++++- pom.xml | 11 +++-------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 18b899a..7344fbd 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -12,9 +12,12 @@ jobs: strategy: matrix: platform: [ ubuntu-latest ] - java-version: [ 8, 11, 13, 14 ] + java-version: [ 8 ] runs-on: ${{ matrix.platform }} + permissions: + contents: read + packages: write env: PLATFORM: ${{ matrix.platform }} JAVA_VERSION: ${{ matrix.java-version }} @@ -36,4 +39,9 @@ jobs: run: mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true --batch-mode --show-version --file pom.xml - name: Build with Maven run: mvn test --batch-mode --file pom.xml + - name: Publish package + if: ${{ github.event_name == 'push' }} + run: mvn --batch-mode deploy + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/pom.xml b/pom.xml index edb1ddd..fb17868 100644 --- a/pom.xml +++ b/pom.xml @@ -113,15 +113,10 @@ - openmrs-repo-modules - OpenMRS Nexus Repository - https://mavenrepo.openmrs.org/nexus/content/repositories/modules + github + GitHub Packages + https://maven.pkg.github.com/icrc/openmrs-module-spa - - openmrs-repo-snapshots - OpenMRS Snapshots - https://mavenrepo.openmrs.org/nexus/content/repositories/snapshots -