-
Notifications
You must be signed in to change notification settings - Fork 89
149 lines (148 loc) · 5.35 KB
/
nebula.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
name: Nebula Build
on:
push:
branches:
- '*'
tags:
- v*.*.*
- v*.*.*-rc.*
pull_request:
jobs:
validation:
name: "Gradle Wrapper Validation"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: gradle/wrapper-validation-action@v1
buildmultijdk:
if: (!startsWith(github.ref, 'refs/tags/v'))
needs: validation
runs-on: ubuntu-latest
strategy:
matrix:
# test against latest update of some major Java version(s), as well as specific LTS version(s)
java: [8, 17, 21]
name: Gradle Build without Publish
steps:
- uses: actions/checkout@v1
- name: Setup git user
run: |
git config --global user.name "Nebula Plugin Maintainers"
git config --global user.email "[email protected]"
- name: Set up JDKs
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: |
8
${{ matrix.java }}
java-package: jdk
- uses: actions/cache@v1
id: gradle-cache
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/gradle/dependency-locks/*.lockfile') }}
restore-keys: |
- ${{ runner.os }}-gradle-
- uses: actions/cache@v1
id: gradle-wrapper-cache
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradlewrapper-${{ hashFiles('gradle/wrapper/*') }}
restore-keys: |
- ${{ runner.os }}-gradlewrapper-
- name: Gradle build
run: ./gradlew --info --stacktrace build
env:
JDK_VERSION_FOR_TESTS: ${{ matrix.java }}
validatepluginpublication:
if: startsWith(github.ref, 'refs/tags/v')
needs: validation
runs-on: ubuntu-latest
name: Gradle Plugin Publication Validation
env:
NETFLIX_OSS_SONATYPE_USERNAME: ${{ secrets.ORG_SONATYPE_USERNAME }}
NETFLIX_OSS_SONATYPE_PASSWORD: ${{ secrets.ORG_SONATYPE_PASSWORD }}
steps:
- uses: actions/checkout@v1
- name: Setup git user
run: |
git config --global user.name "Nebula Plugin Maintainers"
git config --global user.email "[email protected]"
- name: Set up JDKs
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: |
8
21
java-package: jdk
- uses: actions/cache@v1
id: gradle-cache
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/gradle/dependency-locks/*.lockfile') }}
restore-keys: |
- ${{ runner.os }}-gradle-
- uses: actions/cache@v1
id: gradle-wrapper-cache
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradlewrapper-${{ hashFiles('gradle/wrapper/*') }}
restore-keys: |
- ${{ runner.os }}-gradlewrapper-
- name: Verify plugin publication
if: |
startsWith(github.ref, 'refs/tags/v') &&
(!contains(github.ref, '-rc.'))
run: ./gradlew --stacktrace -Dgradle.publish.key=${{ secrets.gradlePublishKey }} -Dgradle.publish.secret=${{ secrets.gradlePublishSecret }} -Prelease.useLastTag=true final publishPlugin --validate-only -x check -x signPluginMavenPublication
publish:
if: startsWith(github.ref, 'refs/tags/v')
needs: validatepluginpublication
runs-on: ubuntu-latest
name: Gradle Build and Publish
env:
NETFLIX_OSS_SONATYPE_USERNAME: ${{ secrets.ORG_SONATYPE_USERNAME }}
NETFLIX_OSS_SONATYPE_PASSWORD: ${{ secrets.ORG_SONATYPE_PASSWORD }}
NETFLIX_OSS_SIGNING_KEY: ${{ secrets.ORG_SIGNING_KEY }}
NETFLIX_OSS_SIGNING_PASSWORD: ${{ secrets.ORG_SIGNING_PASSWORD }}
NETFLIX_OSS_REPO_USERNAME: ${{ secrets.ORG_NETFLIXOSS_USERNAME }}
NETFLIX_OSS_REPO_PASSWORD: ${{ secrets.ORG_NETFLIXOSS_PASSWORD }}
steps:
- uses: actions/checkout@v1
- name: Setup git user
run: |
git config --global user.name "Nebula Plugin Maintainers"
git config --global user.email "[email protected]"
- name: Set up JDKs
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: |
8
21
java-package: jdk
- uses: actions/cache@v1
id: gradle-cache
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/gradle/dependency-locks/*.lockfile') }}
restore-keys: |
- ${{ runner.os }}-gradle-
- uses: actions/cache@v1
id: gradle-wrapper-cache
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradlewrapper-${{ hashFiles('gradle/wrapper/*') }}
restore-keys: |
- ${{ runner.os }}-gradlewrapper-
- name: Publish candidate
if: |
startsWith(github.ref, 'refs/tags/v') &&
contains(github.ref, '-rc.')
run: ./gradlew --info --stacktrace -Prelease.useLastTag=true candidate
- name: Publish release
if: |
startsWith(github.ref, 'refs/tags/v') &&
(!contains(github.ref, '-rc.'))
run: ./gradlew --info --stacktrace -Dgradle.publish.key=${{ secrets.gradlePublishKey }} -Dgradle.publish.secret=${{ secrets.gradlePublishSecret }} -Prelease.useLastTag=true final