Skip to content

Commit

Permalink
ci(maven): fix snapshot publishing job (#394)
Browse files Browse the repository at this point in the history
  • Loading branch information
ebaron authored May 14, 2024
1 parent 75f1429 commit e4deba8
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/push-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,19 @@ jobs:
java-version: '17'
distribution: 'temurin'
- run: mvn -B -U clean verify
publish-snapshot:
get-version:
runs-on: ubuntu-latest
outputs:
project-version: ${{ steps.get-version.outputs.project-version }}
steps:
- id: get-version
run: |
PROJECT_VERSION="$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)"
echo "project-version=${PROJECT_VERSION}" >> "${GITHUB_OUTPUT}"
- id: run-publish
uses: ./.github/workflows/maven-central-publish.yml
secrets: inherit
with:
publish-cmd: './mvnw -Prelease deploy jreleaser:deploy'
if: ${{ github.repository_owner == 'cryostatio' && endsWith(steps.get-version.outputs.project-version, '-SNAPSHOT') }}
publish-snapshot:
needs: get-version
uses: ./.github/workflows/maven-central-publish.yml
secrets: inherit
with:
publish-cmd: './mvnw -Prelease deploy jreleaser:deploy'
if: ${{ github.repository_owner == 'cryostatio' && endsWith(needs.get-version.outputs.project-version, '-SNAPSHOT') }}

0 comments on commit e4deba8

Please sign in to comment.