-
Notifications
You must be signed in to change notification settings - Fork 2
35 lines (30 loc) · 925 Bytes
/
pr.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: pull_request
on:
pull_request_target:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
- name: Set up Maven
env:
MAVEN_USERNAME: antpas14
MAVEN_TOKEN: ${{ secrets.MAVEN_PAT }}
run: |
echo "Setting up Maven with credentials..."
echo "<settings><servers><server><id>github</id><username>${MAVEN_USERNAME}</username><password>${MAVEN_TOKEN}</password></server></servers></settings>" > $HOME/.m2/settings.xml
- name: Build with Maven
run: |
mvn clean install -s $HOME/.m2/settings.xml
-
name: Upload to code cov
uses: codecov/codecov-action@v3