-
-
Notifications
You must be signed in to change notification settings - Fork 217
48 lines (48 loc) · 1.36 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
on:
push:
branches:
- master
- next
tags:
- 'v*'
pull_request:
branches:
- master
name: Build robot
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 11, 17, 21 ]
name: Java ${{ matrix.java }}
steps:
- name: Check out code
uses: actions/[email protected]
- name: Setup java
uses: actions/[email protected]
with:
java-version: ${{ matrix.java }}
distribution: zulu
cache: maven
- run: ./mvnw -B -U -T1C verify
- name: Release
if: startsWith(github.ref, 'refs/tags/v') && matrix.java == '11'
id: create_release
uses: softprops/[email protected]
with:
files: |
tool/target/gp.jar
tool/target/gp.exe
fail_on_unmatched_files: true
body: Release ${{ github.ref_name }}
prerelease: true # manually promoted
- name: Set SSH key
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_KEY }}
- name: Add known host key
run: ssh-keyscan javacard.pro >> ~/.ssh/known_hosts
- name: Deploy package
if: (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/next' || github.ref == 'refs/heads/master') && matrix.java == '11'
run: ./mvnw -B deploy