Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(workflow): Fix workflow execution #87

Merged
merged 2 commits into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading