Skip to content

Commit

Permalink
Merge pull request #88 from GIScience/fix/artifact-upload-4.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelsJP authored Aug 31, 2023
2 parents 1a34a5a + 8a5000f commit f7f7d6d
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 30 deletions.
32 changes: 25 additions & 7 deletions .github/workflows/push-packages.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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 }}
2 changes: 2 additions & 0 deletions .github/workflows/run_maven_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ on:
push:
branches:
- 'ors_4.0'
- 'releases/v4.*'
pull_request:
branches:
- 'ors_4.0'
- 'releases/v4.*'

jobs:
run_tests:
Expand Down
4 changes: 2 additions & 2 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<artifactId>graphhopper-core</artifactId>
<name>GraphHopper Core</name>
<version>4.0-SNAPSHOT</version>
<version>4.8.1-SNAPSHOT</version>
<packaging>jar</packaging>
<description>
GraphHopper is a fast and memory efficient Java road routing engine
Expand All @@ -14,7 +14,7 @@
<parent>
<groupId>com.graphhopper</groupId>
<artifactId>graphhopper-parent</artifactId>
<version>4.0-SNAPSHOT</version>
<version>4.8.1-SNAPSHOT</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion map-matching/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>com.graphhopper</groupId>
<artifactId>graphhopper-parent</artifactId>
<version>4.0-SNAPSHOT</version>
<version>4.8.1-SNAPSHOT</version>
</parent>

<dependencies>
Expand Down
58 changes: 42 additions & 16 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<groupId>com.graphhopper</groupId>
<artifactId>graphhopper-parent</artifactId>
<name>GraphHopper Parent Project</name>
<version>4.0-SNAPSHOT</version>
<version>4.8.1-SNAPSHOT</version>
<packaging>pom</packaging>
<url>https://www.graphhopper.com</url>
<inceptionYear>2012</inceptionYear>
Expand Down Expand Up @@ -307,15 +307,53 @@
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.jfrog.buildinfo</groupId>
<artifactId>artifactory-maven-plugin</artifactId>
<version>3.6.1</version>
<executions>
<execution>
<id>build-info</id>
<goals>
<goal>publish</goal>
</goals>
<configuration>
<artifactory>
<includeEnvVars>true</includeEnvVars>
<envVarsExcludePatterns>*password*,*secret*,*key*,*token*,*passphrase*</envVarsExcludePatterns>
<timeoutSec>60</timeoutSec>
</artifactory>
<publisher>
<contextUrl>https://repo.heigit.org/artifactory</contextUrl>
<username>${env.RT_USERNAME}</username>
<password>${env.RT_PASSWORD}</password>
<excludePatterns>*-tests.jar</excludePatterns>
<repoKey>libs-release-local</repoKey>
<snapshotRepoKey>libs-snapshot-local</snapshotRepoKey>
</publisher>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<distributionManagement>
<downloadUrl>https://repo.heigit.org/artifactory/</downloadUrl>
<repository>
<id>github</id>
<name>GitHub GraphHopper Apache Maven Packages</name>
<url>https://maven.pkg.github.com/graphhopper/graphhopper</url>
<id>releases</id>
<name>HeiGIT repository</name>
<uniqueVersion>false</uniqueVersion>
<url>https://repo.heigit.org/artifactory/libs-release-local</url>
<layout>default</layout>
</repository>
<snapshotRepository>
<id>snapshots</id>
<name>HeiGIT repository (snapshots)</name>
<uniqueVersion>true</uniqueVersion>
<url>https://repo.heigit.org/artifactory/libs-snapshot-local</url>
<layout>default</layout>
</snapshotRepository>
</distributionManagement>

<!-- mvn clean deploy -P release -->
Expand All @@ -341,18 +379,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion reader-gtfs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<parent>
<groupId>com.graphhopper</groupId>
<artifactId>graphhopper-parent</artifactId>
<version>4.0-SNAPSHOT</version>
<version>4.8.1-SNAPSHOT</version>
</parent>

<dependencies>
Expand Down
4 changes: 2 additions & 2 deletions web-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>graphhopper-web-api</artifactId>
<packaging>jar</packaging>
<version>4.0-SNAPSHOT</version>
<version>4.8.1-SNAPSHOT</version>
<name>GraphHopper Web API</name>
<description>JSON Representation of the API classes</description>

<parent>
<groupId>com.graphhopper</groupId>
<artifactId>graphhopper-parent</artifactId>
<version>4.0-SNAPSHOT</version>
<version>4.8.1-SNAPSHOT</version>
</parent>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<link rel="stylesheet" href="css/codemirror/lib/codemirror.css?v=5.59.2">
<link rel="stylesheet" href="css/codemirror/addon/hint/show-hint.css?v=5.59.2">
<link rel="stylesheet" href="css/codemirror/addon/lint/lint.css?v=5.59.2">
<script type="text/javascript" src="js/main.js?v=4.0-SNAPSHOT"></script>
<script type="text/javascript" src="js/main.js?v=4.8.1-SNAPSHOT"></script>
<link rel="stylesheet" type="text/css" href="css/style.css" />
</head>
<body>
Expand Down

0 comments on commit f7f7d6d

Please sign in to comment.