-
-
Notifications
You must be signed in to change notification settings - Fork 52
56 lines (56 loc) · 1.56 KB
/
robot.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
on:
push:
tags:
- 'v*'
branches:
- master
- next
pull_request:
branches:
- master
name: Robot builder
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 8, 11, 17, 21 ]
name: Java ${{ matrix.java }}
steps:
- name: Checkout with submodules
uses: actions/[email protected]
with:
submodules: true
- name: Setup java
uses: actions/[email protected]
with:
java-version: ${{ matrix.java }}
distribution: temurin
cache: maven
- name: Set SSH key
if: github.event_name != 'pull_request'
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_KEY }}
- name: Add host key
if: github.event_name != 'pull_request'
run: ssh-keyscan javacard.pro >> ~/.ssh/known_hosts
- name: Run Maven for capfile
if: matrix.java != 8
run: ./mvnw -T1C -B -U verify
- name: Run ANT tests
if: matrix.java != 21
run: ant test dist
- name: Deploy package or snapshot
if: github.event_name != 'pull_request' && matrix.java == '11'
run: ./mvnw -B -U deploy
- name: Release
if: startsWith(github.ref, 'refs/tags/v') && matrix.java == '11'
id: create_release
uses: softprops/[email protected]
with:
files: |
ant-javacard.jar
fail_on_unmatched_files: true
body: Release ${{ github.ref_name }}
prerelease: true # manually promoted