Skip to content

ENT-5093: Build release OC SSO Notification 2.3.2 #50

ENT-5093: Build release OC SSO Notification 2.3.2

ENT-5093: Build release OC SSO Notification 2.3.2 #50

Workflow file for this run

# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# 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: [ develop ]
pull_request:
branches: [ develop ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
cache: maven
- name: Fail build if version contains SNAPSHOT
run: |
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
if [[ "$VERSION" == *SNAPSHOT ]]; then
echo "Version contains SNAPSHOT, continuing the workflow."
else
echo "Version does not contain SNAPSHOT, failing the workflow!"
exit 1
fi
- name: Build with Maven
run: mvn -B -U clean verify install -P release -Djdk.net.URLClassPath.disableClassPathURLCheck=true
- run: echo "ARTIFACT_FILE_NAME=$(ls oc-sso-notificatie/target/*.jar | xargs basename | sed 's/\.[^.]*$//')" >> $GITHUB_ENV
- run: echo "ARTIFACT_PATH=$(ls oc-sso-notificatie/target/*.jar)" >> $GITHUB_ENV
- uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT_FILE_NAME }}
path: ${{ env.ARTIFACT_PATH }}