Release 9.1 with our patches #3
Workflow file for this run
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
name: Publish to Maven Central | |
on: | |
push: | |
tags: | |
- '**' | |
jobs: | |
maven-central-publish: | |
if: github.repository_owner == 'graphhopper' | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: temurin | |
server-id: ossrh | |
server-username: MAVEN_USERNAME | |
server-password: MAVEN_PASSWORD | |
# feed directly as multi line value | |
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} | |
gpg-passphrase: GPG_PASSPHRASE | |
- name: Cache Maven artifacts | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Cache node | |
uses: actions/cache@v3 | |
with: | |
path: web-bundle/node | |
key: ${{ runner.os }}-node-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os}}-node- | |
- name: Cache node_modules | |
uses: actions/cache@v3 | |
with: | |
path: web-bundle/node_modules | |
key: ${{ runner.os }}-node-${{ hashFiles('**/pom.xml', '**/package.json') }} | |
restore-keys: | | |
${{ runner.os}}-node_modules- | |
- name: clean install | |
run: | | |
mvn -Dkey=$API_KEY clean install -B | |
- name: Build and publish package to maven central ${{ matrix.java-version }} | |
run: | | |
echo "release to maven central" | |
mvn -B versions:set -DnewVersion=$GITHUB_REF_NAME -DgenerateBackupPoms=false | |
mvn deploy -P release -DskipTests=true -Dpgp.secretkey=keyring:id=0E2FBADB -B | |
env: | |
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} | |
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} |