-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENT-5035: Build release SSO notification 2.3.1
- Loading branch information
1 parent
ff00883
commit 5313b29
Showing
3 changed files
with
36 additions
and
12 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,20 +22,23 @@ jobs: | |
java-version: '17' | ||
distribution: 'adopt' | ||
cache: maven | ||
- name: Fail build if version contains SNAPSHOT | ||
- run: echo "VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV | ||
- run: echo "BUILD_VERSION=${VERSION%-SNAPSHOT}" >> $GITHUB_ENV | ||
- name: Build with Maven and publish package | ||
run: | | ||
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) | ||
echo $VERSION | ||
echo $BUILD_VERSION | ||
if [[ "$VERSION" == *SNAPSHOT ]]; then | ||
echo "Version contains SNAPSHOT, failing the workflow!" | ||
exit 1 | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Maven Release Plugin" | ||
mvn -B clean release:prepare release:perform -Prelease -DreleaseVersion=$BUILD_VERSION -Dresume=false -DautoVersionSubmodules=true -DdryRun=false -Dmaven.test.skip=true -DskipITs -DscmCommentPrefix="[maven-release-plugin][ci skip] " -Djdk.net.URLClassPath.disableClassPathURLCheck=true | ||
else | ||
echo "Version is valid, continuing with the workflow." | ||
echo "Version is not valid, failing the workflow." | ||
exit 1 | ||
fi | ||
- name: Build with Maven and publish package | ||
run: mvn -B -U clean verify install -P release deploy -Djdk.net.URLClassPath.disableClassPathURLCheck=true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- run: echo "RELEASE_VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)" >> $GITHUB_ENV | ||
- run: echo "ARTIFACT_JAR_FILE=$(ls oc-sso-notificatie/target/*.jar | xargs basename)" >> $GITHUB_ENV | ||
- 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 | ||
|
@@ -49,8 +52,8 @@ jobs: | |
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ env.RELEASE_VERSION }} | ||
release_name: Release ${{ env.RELEASE_VERSION }} | ||
tag_name: ${{ env.BUILD_VERSION }} | ||
release_name: Release ${{ env.BUILD_VERSION }} | ||
draft: false | ||
prerelease: false | ||
- name: Upload Release Asset | ||
|
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
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