Skip to content

Commit da2c61e

Browse files
committed
👷 Setup matrix build that compiles both current and latest Java.
Build with the current Java (21) and the latest Java (24). Only publish the current.
1 parent 67576d0 commit da2c61e

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

‎.github/workflows/fluentforms-ci.yml‎

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,25 @@ on:
1010

1111
jobs:
1212
build:
13+
name: Java ${{ matrix.java }} build
1314
runs-on: ubuntu-latest
15+
continue-on-error: ${{ matrix.experimental }}
16+
strategy:
17+
fail-fast: true
18+
matrix:
19+
java: [ 21 ]
20+
experimental: [false]
21+
include:
22+
- java: 24
23+
experimental: true
1424

1525
steps:
1626
- uses: actions/checkout@v5
17-
- name: Set up JDK 21 for Shared Runner
27+
- name: Set up JDK ${{ matrix.java }}
1828
uses: actions/setup-java@v5
1929
with:
2030
distribution: 'oracle'
21-
java-version: '21'
31+
java-version: ${{ matrix.java }}
2232
cache: 'maven'
2333
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
2434
settings-path: ${{ github.workspace }} # location for the settings.xml file
@@ -27,7 +37,7 @@ jobs:
2737
run: mvn -B package --file fluentforms
2838

2939
- name: Publish to GitHub Packages Apache Maven
30-
if: github.ref == 'refs/heads/master' || github.ref == 'refs/tags/*' # Only run on main branch or tags
40+
if: (github.ref == 'refs/heads/master' || github.ref == 'refs/tags/*') && ${{ matrix.experimental }} == 'false' # Only run on main branch or tags and non-experimental
3141
run: mvn -B deploy -s $GITHUB_WORKSPACE/settings.xml --file fluentforms
3242
env:
3343
GITHUB_TOKEN: ${{ github.token }}

0 commit comments

Comments
 (0)