diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 66aa565..964866a 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -37,5 +37,11 @@ jobs: - name: Deploy SNAPSHOT if: github.ref == 'refs/heads/release/6.0.x' || github.ref == 'refs/heads/release/5.0.x' run: | + VERSION=$(mvn -q -DforceStdout help:evaluate -Dexpression=project.version) + if [[ "$VERSION" != *-SNAPSHOT ]]; then + echo "⏭️ Version $VERSION is not a SNAPSHOT (release-plugin commit) — skipping deploy" + exit 0 + fi + echo "🚀 Deploying $VERSION" echo "${{ secrets.MAVEN_SETTINGS }}" > ~/.m2/settings-central.xml mvn -B -DskipTests=true deploy -s ~/.m2/settings-central.xml diff --git a/struts2-bootstrap-showcase/pom.xml b/struts2-bootstrap-showcase/pom.xml index 21d8fa7..533811d 100644 --- a/struts2-bootstrap-showcase/pom.xml +++ b/struts2-bootstrap-showcase/pom.xml @@ -29,6 +29,13 @@ org.eclipse.jetty jetty-maven-plugin + + org.sonatype.central + central-publishing-maven-plugin + + true + +