-
Notifications
You must be signed in to change notification settings - Fork 29
45 lines (42 loc) · 1.28 KB
/
main.yml
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
name: Main
on:
pull_request:
push:
branches:
- master
workflow_dispatch:
jobs:
build:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
# Test on all LTS JDKs and the latest JDK.
jdk: [ 8, 11, 17, 21, 22 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: ${{ matrix.jdk }}
- uses: gradle/actions/setup-gradle@v4
- name: Build
run: ./gradlew build "-Pme.champeau.japicmp.javaToolchain.test=${{ matrix.jdk }}"
publish-snapshot:
needs: build
runs-on: ubuntu-latest
if: github.repository_owner == 'melix' && github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 21
- uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: true
# Disable CC due to https://github.com/gradle/gradle/issues/22779
- run: ./gradlew publish --no-configuration-cache
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSSRH_USER }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSSRH_PASSWORD }}