forked from graphhopper/graphhopper
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(workflow): Fix workflow execution
- Loading branch information
1 parent
4d3c5e7
commit 35ba580
Showing
3 changed files
with
93 additions
and
56 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Publish to GitHub Packages | ||
on: | ||
push: | ||
branches: | ||
- 'ors_4.0' | ||
- 'releases/v0.13.24' | ||
release: | ||
types: [ published ] | ||
jobs: | ||
publish: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
- name: Cache Maven artifacts | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven- | ||
- name: Cache node | ||
uses: actions/cache@v2 | ||
with: | ||
path: web-bundle/node | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os}}-node- | ||
- name: Cache node_modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: web-bundle/node_modules | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/pom.xml', '**/package.json') }} | ||
restore-keys: | | ||
${{ runner.os}}-node_modules- | ||
- name: Build and publish package on snapshot | ||
if: github.event_name == 'push' && github.event_name != 'release' | ||
run: | | ||
mvn -B -DskipTests -Pskip-shaded-web-jar -Pskip-tools-jar source:jar deploy | ||
env: | ||
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# 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.*' | ||
- 'releases/v0.13.24' | ||
pull_request: | ||
branches: | ||
- 'ors_4.0' | ||
- 'releases/v4.*' | ||
- 'releases/v0.13.24' | ||
|
||
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 |