Split workflow so that publishing only happens when PR is merged (#25)

Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
This commit is contained in:
Gabriel-Trintinalia
2023-11-10 08:38:53 +11:00
committed by GitHub
parent dca46ad15b
commit f205c0a9c4

View File

@@ -9,7 +9,7 @@ on:
- zkbesu
jobs:
all:
build_and_test:
runs-on: ubuntu-22.04-16core
env:
architecture: "amd64"
@@ -52,6 +52,24 @@ jobs:
only-summary: true
max-annotations: 50
publish:
needs: build_and_test
if: github.event_name != 'pull_request'
runs-on: ubuntu-22.04-16core
env:
architecture: "amd64"
GRADLE_OPTS: "-Xmx6g -Dorg.gradle.parallel=true -Dorg.gradle.workers.max=4"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'adopt'
- name: Publish Java artifacts
run: ./gradlew publish
env: