Skip to content

Commit

Permalink
Merge pull request #87 from GIScience/fix/artifact-upload-4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelsJP authored Aug 31, 2023
2 parents 3c27ad6 + 3bd0113 commit bce8c2d
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 14 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 }}
36 changes: 36 additions & 0 deletions .github/workflows/run_maven_tests.yml
Original file line number Diff line number Diff line change
@@ -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
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.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.1-SNAPSHOT</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion 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.1-SNAPSHOT</version>
<packaging>pom</packaging>
<url>https://www.graphhopper.com</url>
<inceptionYear>2012</inceptionYear>
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.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.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.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.1-SNAPSHOT"></script>
<link rel="stylesheet" type="text/css" href="css/style.css" />
</head>
<body>
Expand Down

0 comments on commit bce8c2d

Please sign in to comment.