From 5e0d0624db18a76ca39f91435cab000c649cf0f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hakan=20Karg=C4=B1n?= Date: Thu, 7 Sep 2023 13:05:06 +0300 Subject: [PATCH] update build workflow --- .../{build.yml => build-project.yml} | 32 ++++++++----------- 1 file changed, 13 insertions(+), 19 deletions(-) rename .github/workflows/{build.yml => build-project.yml} (65%) diff --git a/.github/workflows/build.yml b/.github/workflows/build-project.yml similarity index 65% rename from .github/workflows/build.yml rename to .github/workflows/build-project.yml index 17370628..df211bfb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build-project.yml @@ -1,47 +1,41 @@ name: 'Build' +permissions: + contents: 'read' + on: pull_request: push: branches: [ 'master' ] -permissions: - contents: 'read' - jobs: - validate: - name: 'validate' + build: + name: 'build, test and publish' runs-on: 'ubuntu-latest' steps: - name: 'Checkout repository' - uses: 'actions/checkout@v3' + uses: 'actions/checkout@v2' - - name: 'Validate gradle wrapper' - uses: 'gradle/wrapper-validation-action@v1' - build: - name: 'build, test and publish' - runs-on: 'ubuntu-latest' - - steps: - - name: 'Set up JDK 17' + - name: 'Setup JDK 17' uses: 'actions/setup-java@v3' with: java-version: '17' distribution: 'corretto' - - name: 'Checkout repository' - uses: 'actions/checkout@v3' + - name: 'Validate gradle wrapper' + uses: 'gradle/wrapper-validation-action@v1' - - name: 'Gradle permissions' + - name: 'Setup gradle permissions' run: 'chmod +x gradlew' + - name: 'Test project' run: './gradlew test' - - name: 'Clean and build project' - run: './gradlew clean build' + - name: 'Build project' + run: './gradlew build' - name: 'Publish project' run: './gradlew publishToMavenLocal'