Skip to content

Commit

Permalink
Merge pull request #5 from epam/feat/issue-3/gradle-ci-build
Browse files Browse the repository at this point in the history
feat: add a gradle build workflow
  • Loading branch information
danila-io-dev authored Feb 3, 2025
2 parents 4f7f497 + 460be2b commit b678655
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 1 deletion.
64 changes: 64 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle

name: Java CI with Gradle

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:


jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'

# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
- name: Setup Gradle
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0

- name: Build with Gradle Wrapper
run: |
chmod 755 gradlew
./gradlew build
dependency-submission:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v4

- name: Set executable permissions on the Gradle wrapper
run: |
chmod 755 gradlew
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'

# Generates and submits a dependency graph, enabling Dependabot Alerts for all project dependencies.
# See: https://github.com/gradle/actions/blob/main/dependency-submission/README.md
- name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ We welcome contributions of all sizes, from minor typo fixes to significant new
```
**\<prefix\>** should indicate the overall intent of the code (a given issue) in the branch.
- Possible prefix values: chore, feature, fix, refactor, docs
- Possible prefix values: chore, feat, fix, refactor, docs
- A prefix must always start with a lowercase letter
**\<branch name>** should concisely describe the code (a given issue) in the branch.
Expand Down

0 comments on commit b678655

Please sign in to comment.