Repository navigation
Setup deployment on GitHub packages - #2049
Conversation
| - name: Cache Maven artifacts | ||
| uses: actions/cache@v2 | ||
| with: | ||
| path: ~/.m2/repository | ||
| key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-maven- |
There was a problem hiding this comment.
This creates a hash code from the pom.xml files and uses this has caching key to cache the .m2 folder. The cached files still have to be downloaded on every build so its probably not much faster, but at least this way the logs are not as messy :)
| <snapshotRepository> | ||
| <id>ossrh</id> | ||
| <url>https://oss.sonatype.org/content/repositories/snapshots</url> | ||
| </snapshotRepository> |
There was a problem hiding this comment.
I do not think we need this as we are not releasing any 'snapshot' artifacts?
| run: | | ||
| mvn -B versions:set -DnewVersion=$GITHUB_SHA -DgenerateBackupPoms=false | ||
| mvn -B -DskipTests -Dskip.npm -Pskip-shaded-web-jar -Pskip-tools-jar deploy | ||
| mvn -B -DskipTests -Dskip.installnodenpm -Dskip.npm -Pskip-shaded-web-jar -Pskip-tools-jar deploy |
There was a problem hiding this comment.
Looks good 👍
btw: just for future review: the intention to do this is to release every commit into our own maven repo instead of maven central. (And this could also be done with travis but via github actions is a bit simpler). A proper release can be still done via tagging a commit (travis then pushes it to maven central), then also all tests are executed and jars are created.
|
Another gotcha: While the packages can be downloaded from github even without signing up using them via maven requires authentication with any github account. So you might have to create a personal access token and modify your local |
Every commit is built and the Maven artifacts are deployed to GitHub packages (See the 'packages' icon in the 'Code' tab on GitHub) where the version is set to the git commit hash. The 'Actions' tab on GitHub shows the build jobs. The builds do not contain the ready-to-use fat jars for the GraphHopper server and are only meant to be used for development purposes.