diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index 93a0f1a..dd24af4 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -35,13 +35,19 @@ jobs: echo "REVISION=$REVISION" >> $GITHUB_ENV echo "IMPLEMENTATION_NAME=$IMPLEMENTATION_NAME" >> $GITHUB_ENV - name: Set up JDK 17 - if: ${{ startsWith(github.ref, 'refs/tags/v') }} uses: actions/setup-java@v1 with: java-version: 17 server-id: mchv-release-distribution server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD + - name: Build + if: ${{ !startsWith(github.ref, 'refs/tags/v') }} + shell: bash + run: | + echo "IMPLEMENTATION_NAME: $IMPLEMENTATION_NAME" + + source ./scripts/continuous-integration/github-workflows/only-compile-release.sh - name: Deploy to Maven (Release) if: ${{ startsWith(github.ref, 'refs/tags/v') }} shell: bash diff --git a/scripts/continuous-integration/github-workflows/only-compile-release.sh b/scripts/continuous-integration/github-workflows/only-compile-release.sh new file mode 100755 index 0000000..08b0d46 --- /dev/null +++ b/scripts/continuous-integration/github-workflows/only-compile-release.sh @@ -0,0 +1,10 @@ +#!/bin/bash -e +set -e +# OTHER REQUIRED ENVIRONMENT VARIABLES: +# IMPLEMENTATION_NAME = + +cd ./scripts/core/ +./only_compile_release.sh + +echo "Done." +exit 0 diff --git a/scripts/core/only_compile_release.sh b/scripts/core/only_compile_release.sh new file mode 100755 index 0000000..20e24c3 --- /dev/null +++ b/scripts/core/only_compile_release.sh @@ -0,0 +1,16 @@ +#!/bin/bash -e +# OTHER REQUIRED ENVIRONMENT VARIABLES: +# IMPLEMENTATION_NAME = + +# Check variables correctness +if [ -z "${IMPLEMENTATION_NAME}" ]; then + echo "Missing parameter: IMPLEMENTATION_NAME" + exit 1 +fi + +cd ../../${IMPLEMENTATION_NAME} + +mvn -B clean package --file pom.xml + +echo "Done." +exit 0