-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (45 loc) · 1.41 KB
/
Copy pathjava-matrix.yml
File metadata and controls
51 lines (45 loc) · 1.41 KB
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
name: Java Multi-Version Build
on:
push:
branches:
- 'main'
- 'develop'
- 'feature/**'
- 'fix/**'
- 'hotfix/**'
- 'release/**'
pull_request:
branches:
- 'main'
- 'develop'
workflow_dispatch:
jobs:
build:
name: Build with Java ${{ matrix.java-version }}
runs-on: ubuntu-latest
strategy:
# Keep running other versions even if one fails
fail-fast: false
matrix:
java-version: [ '24', '25', '26']
steps:
# 1. Fetch your repository source code
# https://github.com/actions/checkout
- name: Checkout code
uses: actions/checkout@v7
# 2. Dynamically provision the specific Java version for this matrix run
# https://github.com/actions/setup-java
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v5
with:
distribution: 'temurin' # Options include: temurin, zulu, corretto, microsoft
java-version: ${{ matrix.java-version }}
cache: 'gradle' # Automatically caches dependencies ('maven' or 'gradle')
# 3. Build it
- name: Build with Gradle
run: |
./gradlew build \
-PossrhToken="${{ secrets.OSSRH_TOKEN }}" \
-PossrhTokenPassword="${{ secrets.OSSRH_TOKEN_PASSWORD }}" \
-PsigningKey="${{ secrets.GPG_SIGNING_KEY }}" \
-PsigningPassword="${{ secrets.GPG_SIGNING_PASSWORD }}"