-
Notifications
You must be signed in to change notification settings - Fork 3
55 lines (50 loc) · 1.71 KB
/
CI.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Java CI
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macOS-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Cache local Maven repository
uses: actions/cache@v4
with:
path: |
~/.m2/repository
~/.m2/wrapper
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml', '**/maven-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven
run: ./mvnw --batch-mode --update-snapshots verify -Pflat-repo
- name: Upload p2 update site
uses: actions/upload-artifact@v4
if: runner.os == 'Linux'
with:
name: jbang.eclipse
path: dev.jbang.eclipse.site/target/repository/*
- name: Deploy p2 update site
if: github.ref == 'refs/heads/main' && runner.os == 'Linux'
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{secrets.GITHUB_TOKEN}}"
automatic_release_tag: "latest"
prerelease: true
title: "Development Build"
files: |
dev.jbang.eclipse.site/target/flat-repository/*
- name: Upload code coverage
uses: codecov/codecov-action@v4-beta
if: runner.os == 'Linux'
with:
files: ./coverage/target/site/jacoco-aggregate/jacoco.xml
flags: ${{ runner.os }} # optional
name: ${{ runner.os }}-tests # optional
verbose: true # optional (default = false)