Skip to content

NH-86008: update pipeline configuration file #3

NH-86008: update pipeline configuration file

NH-86008: update pipeline configuration file #3

Workflow file for this run

name: Push
on:
push:
permissions:
packages: write
contents: write
id-token: write
jobs:
deploy-snapshot:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: 8.0.302
distribution: 'temurin'
- name: Deploy snapshot
run: |
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
BRANCH=$(echo -n "${GITHUB_REF_NAME}" | sed -e 's/[^0-9a-zA-Z\._\-]/./g' | tr '[:upper:]' '[:lower:]')
GIT_HASH=$(git rev-parse --short "$GITHUB_SHA")
NEW_VERSION=${VERSION%%-SNAPSHOT}-$BRANCH-$GIT_HASH-SNAPSHOT
mvn versions:set -DnewVersion=$NEW_VERSION
mvn -s .github/m2/settings.xml -T 8 deploy -DskipTests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}