diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 000000000..f2e81aa87 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,36 @@ +name: Deploy application + +on: + pull_request: + branches: + - main + types: + - opened + - closed + - synchronized + +jobs: + build-code: + runs-on: ubuntu-latest + steps: + - name: Checkout the repo + uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + cache: maven + + - name: Compile the code + run: | + ./mvnw compile + + - name: Test the code + run: | + ./mvnw test -Dmaven.test.skip=false -Dmaven.compile.skip=true + + - name: Package the code + run: | + ./mvnw package -Dmaven.compile.skip=true -Dmaven.test.skip=true diff --git a/.github/workflows/maven-build.yml b/.github/workflows/maven-build.yml deleted file mode 100644 index 4718a6ce5..000000000 --- a/.github/workflows/maven-build.yml +++ /dev/null @@ -1,29 +0,0 @@ -# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time -# 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: [ main ] - pull_request: - branches: [ main ] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - java: [ '17' ] - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK ${{matrix.java}} - uses: actions/setup-java@v4 - with: - java-version: ${{matrix.java}} - distribution: 'adopt' - cache: maven - - name: Build with Maven Wrapper - run: ./mvnw -B package diff --git a/pom.xml b/pom.xml index a9bbd2959..dcf48e513 100644 --- a/pom.xml +++ b/pom.xml @@ -14,6 +14,19 @@ petclinic + + + + releases + http://localhost:8081/repository/maven-releases/ + + + + snapshots + http://localhost:8081/repository/maven-snapshots/ + + +