Automatically deploy to Maven Central when creating new GitHub releases #242
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
name: Build/test | |
on: [push, pull_request] | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-22.04, macos-13, macos-latest] | |
java: [8, 17, 21] | |
transport: [native, JDK] | |
tls: [native, JDK] | |
# The macos-14 (and presumably newer) runners are using arm64, and Temurin doesn't support Java 8 on arm64 | |
exclude: | |
- os: macos-latest | |
java: 8 | |
fail-fast: false | |
name: JDK ${{ matrix.java }}, ${{ matrix.os }}, ${{ matrix.transport }} transport, ${{ matrix.tls }} SSL provider | |
steps: | |
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
- name: Set up JDK | |
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1 | |
with: | |
distribution: temurin | |
java-version: ${{ matrix.java }} | |
- name: Cache local Maven repository | |
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Test with Maven | |
env: | |
PUSHY_TEST_TRANSPORT: ${{ matrix.transport }} | |
PUSHY_TEST_SSL_PROVIDER: ${{ matrix.tls }} | |
run: ./mvnw verify -B --file pom.xml |