From c15f715b382f50db6cdf5d9b1277a02318d7b849 Mon Sep 17 00:00:00 2001 From: Julian Psotta Date: Thu, 31 Aug 2023 15:16:03 +0200 Subject: [PATCH 1/3] fix(workflow): Fix workflow execution --- .github/workflows/push-packages.yml | 32 +++++++++++++++++++++------ .github/workflows/run_maven_tests.yml | 2 ++ 2 files changed, 27 insertions(+), 7 deletions(-) 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 index 06c19149028..67d0086e0c5 100644 --- a/.github/workflows/run_maven_tests.yml +++ b/.github/workflows/run_maven_tests.yml @@ -7,9 +7,11 @@ on: push: branches: - 'ors_4.0' + - 'releases/v4.*' pull_request: branches: - 'ors_4.0' + - 'releases/v4.*' jobs: run_tests: From 4a060e2c243b5e31e739adb4ced6a44054dbadbe Mon Sep 17 00:00:00 2001 From: Julian Psotta Date: Thu, 31 Aug 2023 16:40:43 +0200 Subject: [PATCH 2/3] fix(version): Fix snapshot version --- core/pom.xml | 4 ++-- map-matching/pom.xml | 2 +- pom.xml | 2 +- reader-gtfs/pom.xml | 2 +- web-api/pom.xml | 4 ++-- web-bundle/src/main/resources/com/graphhopper/maps/index.html | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/core/pom.xml b/core/pom.xml index 35fb182b733..771ab18cd8b 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -5,7 +5,7 @@ graphhopper-core GraphHopper Core - 4.0-SNAPSHOT + 4.8.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.8.1-SNAPSHOT diff --git a/map-matching/pom.xml b/map-matching/pom.xml index f6211561998..dbec93c943f 100644 --- a/map-matching/pom.xml +++ b/map-matching/pom.xml @@ -9,7 +9,7 @@ com.graphhopper graphhopper-parent - 4.0-SNAPSHOT + 4.8.1-SNAPSHOT diff --git a/pom.xml b/pom.xml index 3903009ea7b..12dbd071b12 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.graphhopper graphhopper-parent GraphHopper Parent Project - 4.0-SNAPSHOT + 4.8.1-SNAPSHOT pom https://www.graphhopper.com 2012 diff --git a/reader-gtfs/pom.xml b/reader-gtfs/pom.xml index 2299246b4c2..f8ec77502f8 100644 --- a/reader-gtfs/pom.xml +++ b/reader-gtfs/pom.xml @@ -10,7 +10,7 @@ com.graphhopper graphhopper-parent - 4.0-SNAPSHOT + 4.8.1-SNAPSHOT diff --git a/web-api/pom.xml b/web-api/pom.xml index d029da38683..acc38d2f630 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.8.1-SNAPSHOT GraphHopper Web API JSON Representation of the API classes com.graphhopper graphhopper-parent - 4.0-SNAPSHOT + 4.8.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..f960f76b630 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 @@ - + From 8a5000fea9153cc0566473d5d01dc5cdf15803f0 Mon Sep 17 00:00:00 2001 From: Julian Psotta Date: Thu, 31 Aug 2023 16:59:54 +0200 Subject: [PATCH 3/3] fix(workflow): Add the artifact upload --- pom.xml | 56 +++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 41 insertions(+), 15 deletions(-) diff --git a/pom.xml b/pom.xml index 12dbd071b12..ffda95ed6ab 100644 --- a/pom.xml +++ b/pom.xml @@ -307,15 +307,53 @@ + + org.jfrog.buildinfo + artifactory-maven-plugin + 3.6.1 + + + build-info + + publish + + + + true + *password*,*secret*,*key*,*token*,*passphrase* + 60 + + + https://repo.heigit.org/artifactory + ${env.RT_USERNAME} + ${env.RT_PASSWORD} + *-tests.jar + libs-release-local + libs-snapshot-local + + + + + + https://repo.heigit.org/artifactory/ - github - GitHub GraphHopper Apache Maven Packages - https://maven.pkg.github.com/graphhopper/graphhopper + releases + HeiGIT repository + false + https://repo.heigit.org/artifactory/libs-release-local + default + + snapshots + HeiGIT repository (snapshots) + true + https://repo.heigit.org/artifactory/libs-snapshot-local + default + @@ -341,18 +379,6 @@ - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.8 - true - - ossrh - https://oss.sonatype.org/ - true - - - org.apache.maven.plugins maven-javadoc-plugin