Skip to content

Commit

Permalink
update build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
hakan-krgn committed Sep 7, 2023
1 parent 71835a2 commit 5e0d062
Showing 1 changed file with 13 additions and 19 deletions.
32 changes: 13 additions & 19 deletions .github/workflows/build.yml → .github/workflows/build-project.yml
Original file line number Diff line number Diff line change
@@ -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'

0 comments on commit 5e0d062

Please sign in to comment.