Skip to content

Commit

Permalink
Create main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Krithikj20 authored Apr 1, 2024
1 parent a13d533 commit 71e2183
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Java CI with Maven
'on':
push:
branches:
- $default-branch
pull_request:
branches:
- $default-branch
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 21 (or adjust as needed)
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: temurin
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: '${{ runner.os }}-maven-${{ hashFiles(''pom.xml'') }}'
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven
run: mvn -B package

0 comments on commit 71e2183

Please sign in to comment.