Known host needed #106
This file contains hidden or 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: | |
| branches: | |
| - master | |
| - next | |
| tags: | |
| - 'v*' | |
| pull_request: | |
| branches: | |
| - master | |
| permissions: | |
| contents: write | |
| name: Build robot | |
| jobs: | |
| build: | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| java: [ 17, 21, 25 ] | |
| name: Java ${{ matrix.java }} | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 # To make git describe give the intended output | |
| fetch-tags: true | |
| - name: Setup java | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: ${{ matrix.java }} | |
| distribution: zulu | |
| cache: maven | |
| - run: ./mvnw --no-transfer-progress -P exe -B -U -T1C verify | |
| - name: Set SSH key | |
| if: (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/next' || github.ref == 'refs/heads/master') && matrix.java == '17' | |
| uses: webfactory/[email protected] | |
| with: | |
| ssh-private-key: ${{ secrets.SSH_KEY }} | |
| - name: Add known host key | |
| if: (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/next' || github.ref == 'refs/heads/master') && matrix.java == '17' | |
| run: ssh-keyscan mvn.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 == '17' | |
| run: ./mvnw --no-transfer-progress -B deploy | |
| - name: Release | |
| if: startsWith(github.ref, 'refs/tags/v') && matrix.java == '17' | |
| 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 |