77 push :
88 branches :
99 - master
10+ tags :
11+ - **
1012 # Allows you to run this workflow manually from the Actions tab
1113 workflow_dispatch :
1214
4850 else
4951 echo "is_snapshot=false" >> $GITHUB_OUTPUT
5052 fi
53+ if [[ ${{ github.ref_name }} =~ **/tags/** ||; then
54+ echo "has_tag=true" >> $GITHUB_OUTPUT
55+ else
56+ echo "has_tag=false" >> $GITHUB_OUTPUT
57+ fi
5158
52- - name : Set up JDK 1.8 for NERZ Deployment
59+ - name : Set up JDK 1.8 for NERZ-Snapshot- Deployment
5360 uses : actions/setup-java@v3
5461 with :
5562 java-version : 8.0.302+8
@@ -58,15 +65,34 @@ jobs:
5865 server-username : MAVEN_USERNAME
5966 server-password : MAVEN_PASSWORD
6067
61- - name : Publish to NERZ Nexus
62- # if: steps.check_release.outputs.is_snapshot == 'true'
68+ - name : Publish Snapshots to NERZ Nexus
69+ if : steps.check_release.outputs.is_snapshot == 'true'
70+ run : |
71+ echo "Ist ein Snapshot: ${{ steps.check_release.outputs.is_snapshot }} und hat einen Tag ${{ steps.check_release.outputs.has_tag }}"
72+ mvn deploy -P nerz
73+ env :
74+ MAVEN_USERNAME : ${{ secrets.NERZ_USERNAME }}
75+ MAVEN_PASSWORD : ${{ secrets.NERZ_TOKEN }}
76+
77+ - name : Set up JDK 1.8 for NERZ-Release-Deployment
78+ uses : actions/setup-java@v3
79+ with :
80+ java-version : 8.0.302+8
81+ distribution : ' temurin'
82+ server-id : nerz-releases
83+ server-username : MAVEN_USERNAME
84+ server-password : MAVEN_PASSWORD
85+
86+ - name : Publish Releases to NERZ Nexus
87+ if : steps.check_release.outputs.is_snapshot == 'false' and steps.check_release.outputs.has_tag == 'true'
6388 run : |
6489 echo "Ist ein Snapshot: ${{ steps.check_release.outputs.is_snapshot }}"
6590 mvn deploy -P nerz
6691 env :
6792 MAVEN_USERNAME : ${{ secrets.NERZ_USERNAME }}
6893 MAVEN_PASSWORD : ${{ secrets.NERZ_TOKEN }}
69-
94+
95+
7096 - name : JFROG CLI
7197 uses : jfrog/setup-jfrog-cli@v3.3.0
7298 env :
0 commit comments