-
Notifications
You must be signed in to change notification settings - Fork 26
91 lines (76 loc) · 3.31 KB
/
maven.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: MoreUnit Build
on:
push:
branches: [ master ]
tags : ['*']
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
permissions:
checks: write
contents: write
steps:
- name: Checkout 🛎
uses: actions/checkout@v4
- name: Get Time for BUILD_ID
id: time
uses: nanzm/[email protected]
with:
format: 'YYYYMMDD_HHmm'
- name: Get Branch name for BUILD_LABEL
id: branch_name
shell: bash
run: echo "::set-output name=branch::${GITHUB_REF#refs/heads/}"
- name: Set up Java ☕️
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
cache: 'maven'
- name: Setup Maven
uses: stCarolas/[email protected]
with:
maven-version: 3.9.4
- name: Build and verify for eclipse-4.25 (ignoring test results)
env:
BUILD_ID: "${{ steps.time.outputs.time }}"
BUILD_TYPE: "S"
BUILD_LABEL: "CI ${{ steps.time.outputs.time }} (${{ steps.branch_name.outputs.branch }})"
run: xvfb-run mvn -file org.moreunit.build/pom.xml clean verify -Dtarget.platform.classifier=eclipse-4.25 -Dmaven.test.failure.ignore=true -Dmaven.test.error.ignore=true --fail-at-end -Dtycho.disableP2Mirrors=true --batch-mode --strict-checksums --update-snapshots -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
- name: Build and verify for eclipse-4.30
env:
BUILD_ID: "${{ steps.time.outputs.time }}"
BUILD_TYPE: "S"
BUILD_LABEL: "CI ${{ steps.time.outputs.time }} (${{ steps.branch_name.outputs.branch }})"
run: xvfb-run mvn -file org.moreunit.build/pom.xml clean install -Dtarget.platform.classifier=eclipse-4.30 --fail-at-end -Dtycho.disableP2Mirrors=true --batch-mode --strict-checksums --update-snapshots -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
- name: Publish Surefire Test Results for 🖨
if: ${{ always() }}
uses: ScaCap/action-surefire-report@v1
with:
check_name: Test Results
- name: Flatten P2 repository
uses: RoiSoleil/flatten-p2-repo@main
with:
repository-path: "./org.moreunit.updatesite/target/repository/"
- name: Release SNAPSHOT
if: github.ref == 'refs/heads/master'
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "snapshot"
prerelease: true
title: "Development Build"
files: |
./org.moreunit.updatesite/target/org.moreunit.updatesite-*-SNAPSHOT.zip
./org.moreunit.updatesite/target/flat-repository/*
- name: Release RELEASE
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
files: |
./org.moreunit.updatesite/target/org.moreunit.updatesite-*.zip
./org.moreunit.updatesite/target/flat-repository/*