Skip to content

Commit

Permalink
Add conditional deployment to Maven Central
Browse files Browse the repository at this point in the history
  • Loading branch information
morpheus-87 committed Nov 30, 2020
1 parent 473aa3e commit 6f5df92
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,12 @@ jobs:
run: echo "LD_LIBRARY_PATH=/tmp/openjpeg-v2.3.0-linux-x86_64/lib" >> $GITHUB_ENV
- name: Install TurboJPEG library
run: sudo apt install libturbojpeg
- name: Install XML utils
run: sudo apt install libxml2-utils
- name: Set project version
run: echo "PROJECT_VERSION=$(xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' pom.xml)" >> $GITHUB_ENV
- name: Publish to the Maven Central Repository
run: mvn -B deploy
run: if [[ "$PROJECT_VERSION" =~ .*SNAPSHOT ]]; then mvn -B deploy; fi
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}

0 comments on commit 6f5df92

Please sign in to comment.