Skip to content

Commit 072e1e9

Browse files
committed
GHA fix
1 parent 2780ade commit 072e1e9

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.github/workflows/push-snapshots.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,14 @@ jobs:
3232
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
3333
restore-keys: ${{ runner.os }}-m2
3434

35-
- name: Set PROJECT_VERSION
36-
run: export PROJECT_VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
37-
3835
- name: Publish to Apache Maven Central
39-
if: ${{ endsWith( env.PROJECT_VERSION, '-SNAPSHOT' }}
40-
run: mvn --batch-mode -Prelease deploy
36+
run: |
37+
PROJECT_VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
38+
if [[ "$PROJECT_VERSION" == *-SNAPSHOT ]]; then
39+
mvn --batch-mode -Prelease deploy
40+
else
41+
mvn --batch-mode package
42+
fi
4143
env:
4244
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
4345
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}

0 commit comments

Comments
 (0)