From 4d455a6335b7c7646fb28560fa5051134af6b2f5 Mon Sep 17 00:00:00 2001 From: Michael Krog Date: Fri, 22 Sep 2023 09:01:30 +0200 Subject: [PATCH] Adds build script. --- .github/workflows/maven-publish.yml | 30 ++++++++++++++++++++ .github/workflows/maven.yml | 24 ++++++++++++++++ pom.xml | 43 ++++++++++++++++++----------- 3 files changed, 81 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/maven-publish.yml create mode 100644 .github/workflows/maven.yml diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml new file mode 100644 index 0000000..6a146cb --- /dev/null +++ b/.github/workflows/maven-publish.yml @@ -0,0 +1,30 @@ +# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created +# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path + +name: Maven Package + +on: + release: + types: [created] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + server-id: github # Value of the distributionManagement/repository/id field of the pom.xml + settings-path: ${{ github.workspace }} # location for the settings.xml file + + - name: Build with Maven + run: mvn -B package --file pom.xml + + - name: Publish to GitHub Packages Apache Maven + run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml + env: + GITHUB_TOKEN: ${{ github.token }} diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 0000000..74c342f --- /dev/null +++ b/.github/workflows/maven.yml @@ -0,0 +1,24 @@ +# This workflow will build a Java project with Maven +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven + +name: Java CI with Maven + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + - name: Build with Maven + run: mvn -B package --file pom.xml diff --git a/pom.xml b/pom.xml index b77ffac..b4e3112 100644 --- a/pom.xml +++ b/pom.xml @@ -2,31 +2,41 @@ 4.0.0 - - dk.apaq - parent - 1.2.5 - - dk.apaq rest-patch 1.0.3-SNAPSHOT + jar + + + UTF-8 + 11 + 11 + + + + + + github + Github Packages + https://maven.pkg.github.com/Apaq/rest-patch + + com.fasterxml.jackson.core jackson-databind - 2.8.3 + 2.15.2 org.slf4j slf4j-api - 1.7.21 + 1.7.36 - apache-beanutils + commons-beanutils commons-beanutils - 1.7.0 + 1.9.4 commons-lang @@ -43,19 +53,20 @@ junit junit - 4.12 + 4.13.2 test + org.apache.maven.plugins maven-compiler-plugin - 1.8 - 1.8 + 11 + 11 @@ -63,9 +74,9 @@ - scm:git:https://github.com/michaelkrog/rest-patch.git - scm:git:git@github.com:michaelkrog/rest-patch.git - https://github.com/michaelkrog/rest-patch + scm:git:https://github.com/apaq/rest-patch.git + scm:git:git@github.com:apaq/rest-patch.git + https://github.com/apaq/rest-patch HEAD \ No newline at end of file