-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (43 loc) · 1.1 KB
/
cd-config.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
46
47
48
49
name: GitHub CD
on:
push:
branches:
- main
tags:
- camel-ldp-recipes-[0-9]+.[0-9]+.[0-9]+
jobs:
validation:
name: Validation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v3
build:
name: CD environment
needs: [validation]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 11
- name: Build with Gradle
run: ./gradlew build javadoc
sonatype:
name: Deploy artifacts to Sonatype
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 11
- name: Publish to Sonatype
run: if [[ $(./gradlew -q getVersion) == *SNAPSHOT* ]]; then ./gradlew publish ; fi
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}