From 3640131b1ba3666a644dd7cfc89ff2af4813248f Mon Sep 17 00:00:00 2001 From: Phil Pinel <35564100+EdgewareRoad@users.noreply.github.com> Date: Wed, 19 Jun 2024 09:57:40 +0100 Subject: [PATCH] Amended GitHub Actions to split job to build and publish --- .github/workflows/gradle.yml | 8 +++++--- src/main/resources/application.properties | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 959736a..ecca7c0 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -5,10 +5,8 @@ on: workflow_dispatch: jobs: - build: - + build-java: runs-on: ubuntu-latest - steps: - uses: actions/checkout@v4.1.1 - name: Set up JDK 21 @@ -29,6 +27,10 @@ jobs: echo "github.ref: ${{ github.ref }}" - name: Build with Gradle run: gradle distZip --warning-mode all + publish: + needs: build-java + runs-on: ubuntu-latest + steps: - name: Publish with Gradle if: endsWith(steps.read-properties.outputs.trivysummary_version, '-SNAPSHOT') || (startsWith(github.ref, 'refs/tags/') && endsWith(github.ref, steps.read-properties.outputs.trivysummary_version)) run: gradle publish -Pmvnpub.user="${{ secrets.MAVENREPO_USER }}" -Pmvnpub.key="${{ secrets.MAVENREPO_TOKEN }}" --warning-mode all diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index b4e4474..0975f25 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,4 +1,4 @@ -trivysummary.version=3.0.3 +trivysummary.version=3.1.0-SNAPSHOT logging.level.root=ERROR