-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (60 loc) · 1.52 KB
/
gradle-build.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Java CI with Gradle
on:
push:
branches:
- main
- development
pull_request:
branches:
- main
- development
permissions:
contents: read
jobs:
validation:
name: "Validation"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1
build:
name: "Build"
needs: validation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: build
uses: gradle/gradle-build-action@v2
with:
arguments: build --scan
publish:
name: "Publish to Nexus"
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: publish
env:
ORG_GRADLE_PROJECT_edpnNexusUsername: ${{ secrets.NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_edpnNexusPassword: ${{ secrets.NEXUS_PASSWORD }}
uses: gradle/gradle-build-action@v2
with:
arguments: publish