diff --git a/.github/workflows/push-packages.yml b/.github/workflows/push-packages.yml index b6791a366ed..3593eecef8a 100644 --- a/.github/workflows/push-packages.yml +++ b/.github/workflows/push-packages.yml @@ -1,13 +1,21 @@ name: Publish to GitHub Packages -on: push +on: + push: + branches: + - 'ors_4.0' + - 'releases/v4.*' + release: + types: [ published ] jobs: publish: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 + - name: Set up JDK 17 + uses: actions/setup-java@v2 with: - java-version: 1.8 + distribution: 'temurin' + java-version: '17' - name: Cache Maven artifacts uses: actions/cache@v2 with: @@ -29,9 +37,19 @@ jobs: key: ${{ runner.os }}-node-${{ hashFiles('**/pom.xml', '**/package.json') }} restore-keys: | ${{ runner.os}}-node_modules- - - name: Build and publish package + - name: Build and publish package on snapshot + if: github.event_name == 'push' && github.event_name != 'release' run: | - mvn -B versions:set -DnewVersion=$GITHUB_SHA -DgenerateBackupPoms=false mvn -B -DskipTests -Pskip-shaded-web-jar -Pskip-tools-jar source:jar deploy env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + RT_USERNAME: ${{ secrets.RT_USERNAME }} + RT_PASSWORD: ${{ secrets.RT_PASSWORD }} + # Write a task to publish the package to GitHub Packages when a release is published + - name: Build and publish package on release + if: github.event_name == 'release' + run: | + mvn versions:set -DnewVersion=${{ github.event.release.tag_name }} -DgenerateBackupPoms=false + mvn -B -DskipTests -Pskip-shaded-web-jar -Pskip-tools-jar source:jar deploy + env: + RT_USERNAME: ${{ secrets.RT_USERNAME }} + RT_PASSWORD: ${{ secrets.RT_PASSWORD }} diff --git a/.github/workflows/run_maven_tests.yml b/.github/workflows/run_maven_tests.yml new file mode 100644 index 00000000000..67d0086e0c5 --- /dev/null +++ b/.github/workflows/run_maven_tests.yml @@ -0,0 +1,36 @@ +# 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: + - 'ors_4.0' + - 'releases/v4.*' + pull_request: + branches: + - 'ors_4.0' + - 'releases/v4.*' + +jobs: + run_tests: + name: Run unit and integration tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set up JDK 17 + uses: actions/setup-java@v2 + with: + distribution: 'temurin' + java-version: '17' + - name: Cache Maven packages + uses: actions/cache@v2 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - name: Test, build, run API tests + run: mvn -B -f pom.xml verify diff --git a/core/pom.xml b/core/pom.xml index 05ae2657cbd..0529016a9d6 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -5,7 +5,7 @@ graphhopper-core GraphHopper Core - 4.0-SNAPSHOT + 4.1-SNAPSHOT jar GraphHopper is a fast and memory efficient Java road routing engine @@ -14,7 +14,7 @@ com.graphhopper graphhopper-parent - 4.0-SNAPSHOT + 4.1-SNAPSHOT diff --git a/pom.xml b/pom.xml index 61256a169d0..499333973a2 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.graphhopper graphhopper-parent GraphHopper Parent Project - 4.0-SNAPSHOT + 4.1-SNAPSHOT pom https://www.graphhopper.com 2012 diff --git a/reader-gtfs/pom.xml b/reader-gtfs/pom.xml index 2299246b4c2..5a64d6e4886 100644 --- a/reader-gtfs/pom.xml +++ b/reader-gtfs/pom.xml @@ -10,7 +10,7 @@ com.graphhopper graphhopper-parent - 4.0-SNAPSHOT + 4.1-SNAPSHOT diff --git a/web-api/pom.xml b/web-api/pom.xml index d029da38683..bdb1840772f 100644 --- a/web-api/pom.xml +++ b/web-api/pom.xml @@ -5,14 +5,14 @@ 4.0.0 graphhopper-web-api jar - 4.0-SNAPSHOT + 4.1-SNAPSHOT GraphHopper Web API JSON Representation of the API classes com.graphhopper graphhopper-parent - 4.0-SNAPSHOT + 4.1-SNAPSHOT diff --git a/web-bundle/src/main/resources/com/graphhopper/maps/index.html b/web-bundle/src/main/resources/com/graphhopper/maps/index.html index 011f6d92920..3c24fb269b9 100644 --- a/web-bundle/src/main/resources/com/graphhopper/maps/index.html +++ b/web-bundle/src/main/resources/com/graphhopper/maps/index.html @@ -36,7 +36,7 @@ - +