Skip to content

Commit

Permalink
Amended GitHub Actions to split job to build and publish
Browse files Browse the repository at this point in the history
  • Loading branch information
EdgewareRoad committed Jun 19, 2024
1 parent d6481aa commit 3640131
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ on:
workflow_dispatch:

jobs:
build:

build-java:
runs-on: ubuntu-latest

steps:
- uses: actions/[email protected]
- name: Set up JDK 21
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
trivysummary.version=3.0.3
trivysummary.version=3.1.0-SNAPSHOT

logging.level.root=ERROR

Expand Down

0 comments on commit 3640131

Please sign in to comment.