Skip to content

Commit

Permalink
Update maven.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Mw3y authored Jan 10, 2024
1 parent 54c9ce7 commit 53160e8
Showing 1 changed file with 21 additions and 8 deletions.
29 changes: 21 additions & 8 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,29 @@ jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17

- name: Cache the Maven packages to speed up build
uses: actions/cache@v1
with:
java-version: '17'
distribution: 'temurin'
- run: mvn --batch-mode --update-snapshots verify
- run: mkdir staging && cp target/*.jar staging
- uses: actions/upload-artifact@v3
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Build and test project with Maven
run: mvn -B package --file pom.xml

- name: Create staging directory and copy jars
run: mkdir staging && cp target/*jar-with-dependencies.jar staging

- name: Package application
uses: actions/upload-artifact@v1
with:
name: PokeMAN
path: staging

0 comments on commit 53160e8

Please # to comment.