Preparations for 2024 release #34
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
tags: | |
- 'v*' | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
name: Build robot | |
jobs: | |
build: | |
runs-on: ubuntu-24.04 | |
strategy: | |
matrix: | |
java: [ 11, 17, 21 ] | |
name: Java ${{ matrix.java }} build | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 # To make git describe give the intended output | |
fetch-tags: true | |
- name: Setup Java | |
uses: actions/[email protected] | |
with: | |
java-version: ${{ matrix.java }} | |
distribution: temurin | |
- name: Set SSH key | |
if: github.event_name != 'pull_request' | |
uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.SSH_KEY }} | |
- name: Add known host key | |
if: github.event_name != 'pull_request' | |
run: ssh-keyscan javacard.pro >> ~/.ssh/known_hosts | |
- name: Package | |
run: ./mvnw -P exe -T1C -U -B clean verify | |
- name: Release | |
if: startsWith(github.ref, 'refs/tags/v') && matrix.java == '11' | |
id: create_release | |
uses: softprops/[email protected] | |
with: | |
files: | | |
tool/target/apdu4j.jar | |
tool/target/apdu4j.exe | |
fail_on_unmatched_files: true | |
body: Release ${{ github.ref_name }} | |
prerelease: true # manually promoted | |
- name: Deploy package | |
if: matrix.java == '11' && github.ref == 'refs/heads/master' | |
run: ./mvnw -T1C -B deploy |