diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index ed157da7..52681c0a 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -8,11 +8,8 @@ on: - 'main' jobs: - setup: + snapshot: runs-on: ubuntu-latest - outputs: - # Output project version from the POM to conditionally run dependent steps - project-version: ${{ steps.project_version.outputs.version }} steps: - name: Checkout latest code uses: actions/checkout@v3 @@ -33,15 +30,9 @@ jobs: id: project_version run: echo "VERSION=`mvn help:evaluate -Dexpression=project.version -q -DforceStdout`" >> $GITHUB_OUTPUT - # Run only if project POM has version ending in "-SNAPSHOT" - snapshot: - needs: setup - if: endsWith(needs.setup.outputs.project-version, '-SNAPSHOT') - runs-on: ubuntu-latest - steps: - - name: Debug - run: echo "$VERSION `pwd` `ls`" + # Only execute for -SNAPSHOT versions - name: Publish SNAPSHOT + if: ${{ endsWith(steps.project_version.outputs.version, '-SNAPSHOT') }} run: mvn -B -ntp clean deploy env: MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}