Skip to content

Commit 38ef9d5

Browse files
authored
Merge pull request #1 from nebula-plugins/empty-gradle-build
add empty gradle build and standard github actions
2 parents 1cb0046 + 4f177fe commit 38ef9d5

File tree

9 files changed

+492
-1
lines changed

9 files changed

+492
-1
lines changed

.github/workflows/build.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Nebula Build
2+
on:
3+
push:
4+
branches:
5+
- 'main'
6+
pull_request:
7+
8+
jobs:
9+
validation:
10+
name: "Gradle Wrapper Validation"
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: gradle/actions/wrapper-validation@v4
15+
buildmultijdk:
16+
needs: validation
17+
runs-on: ubuntu-latest
18+
strategy:
19+
matrix:
20+
# test against latest update of some major Java version(s), as well as specific LTS version(s)
21+
java: [17, 21, 25]
22+
name: Gradle Build without Publish
23+
steps:
24+
- uses: actions/checkout@v4
25+
- name: Setup git user
26+
run: |
27+
git config --global user.name "Nebula Plugin Maintainers"
28+
git config --global user.email "nebula-plugins-oss@netflix.com"
29+
- name: Set up JDKs
30+
uses: actions/setup-java@v4
31+
with:
32+
distribution: 'zulu'
33+
java-version: |
34+
11
35+
21
36+
${{ matrix.java }}
37+
java-package: jdk
38+
- name: Setup Gradle
39+
uses: gradle/actions/setup-gradle@v5
40+
with:
41+
cache-overwrite-existing: true
42+
- name: Gradle build
43+
run: ./gradlew --info --stacktrace build
44+
env:
45+
JDK_VERSION_FOR_TESTS: ${{ matrix.java }}

.github/workflows/publish.yml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: Nebula Publish
2+
on:
3+
push:
4+
tags:
5+
- v*.*.*
6+
- v*.*.*-rc.*
7+
8+
jobs:
9+
validation:
10+
name: "Gradle Wrapper Validation"
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: gradle/actions/wrapper-validation@v4
15+
validatepluginpublication:
16+
needs: validation
17+
runs-on: ubuntu-latest
18+
name: Gradle Plugin Publication Validation
19+
env:
20+
NETFLIX_OSS_SONATYPE_USERNAME: ${{ secrets.ORG_SONATYPE_USERNAME }}
21+
NETFLIX_OSS_SONATYPE_PASSWORD: ${{ secrets.ORG_SONATYPE_PASSWORD }}
22+
steps:
23+
- uses: actions/checkout@v4
24+
- name: Setup git user
25+
run: |
26+
git config --global user.name "Nebula Plugin Maintainers"
27+
git config --global user.email "nebula-plugins-oss@netflix.com"
28+
- name: Set up JDKs
29+
uses: actions/setup-java@v4
30+
with:
31+
distribution: 'zulu'
32+
java-version: |
33+
11
34+
21
35+
java-package: jdk
36+
- name: Setup Gradle
37+
uses: gradle/actions/setup-gradle@v5
38+
with:
39+
cache-overwrite-existing: true
40+
- name: Verify plugin publication
41+
if: |
42+
startsWith(github.ref, 'refs/tags/v') &&
43+
(!contains(github.ref, '-rc.'))
44+
run: ./gradlew --stacktrace -Dgradle.publish.key=${{ secrets.gradlePublishKey }} -Dgradle.publish.secret=${{ secrets.gradlePublishSecret }} -Prelease.useLastTag=true final publishPlugin --validate-only -x check -x signPluginMavenPublication
45+
publish:
46+
if: github.event.base_ref == 'refs/heads/main' # tags must be pushed to main
47+
needs: validatepluginpublication
48+
runs-on: ubuntu-latest
49+
name: Gradle Build and Publish
50+
env:
51+
NETFLIX_OSS_SONATYPE_USERNAME: ${{ secrets.ORG_SONATYPE_USERNAME }}
52+
NETFLIX_OSS_SONATYPE_PASSWORD: ${{ secrets.ORG_SONATYPE_PASSWORD }}
53+
NETFLIX_OSS_SIGNING_KEY: ${{ secrets.ORG_SIGNING_KEY }}
54+
NETFLIX_OSS_SIGNING_PASSWORD: ${{ secrets.ORG_SIGNING_PASSWORD }}
55+
NETFLIX_OSS_REPO_USERNAME: ${{ secrets.ORG_NETFLIXOSS_USERNAME }}
56+
NETFLIX_OSS_REPO_PASSWORD: ${{ secrets.ORG_NETFLIXOSS_PASSWORD }}
57+
steps:
58+
- uses: actions/checkout@v4
59+
- name: Setup git user
60+
run: |
61+
git config --global user.name "Nebula Plugin Maintainers"
62+
git config --global user.email "nebula-plugins-oss@netflix.com"
63+
- name: Set up JDKs
64+
uses: actions/setup-java@v4
65+
with:
66+
distribution: 'zulu'
67+
java-version: |
68+
11
69+
21
70+
java-package: jdk
71+
- name: Setup Gradle
72+
uses: gradle/actions/setup-gradle@v5
73+
with:
74+
cache-overwrite-existing: true
75+
- name: Gradle build
76+
run: ./gradlew --stacktrace build
77+
- name: Publish candidate
78+
if: |
79+
startsWith(github.ref, 'refs/tags/v') &&
80+
contains(github.ref, '-rc.')
81+
run: ./gradlew --info --stacktrace -Prelease.useLastTag=true candidate
82+
- name: Publish release
83+
if: |
84+
startsWith(github.ref, 'refs/tags/v') &&
85+
(!contains(github.ref, '-rc.'))
86+
run: ./gradlew --info --stacktrace -Dgradle.publish.key=${{ secrets.gradlePublishKey }} -Dgradle.publish.secret=${{ secrets.gradlePublishSecret }} -Prelease.useLastTag=true final

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
LICENSE
1+
## LICENSE
22
Copyright 2025 Netflix, Inc.
33

44
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

build.gradle.kts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
tasks.wrapper {
3+
distributionType = Wrapper.DistributionType.ALL // ALL helps when debugging gradle plugins
4+
gradleVersion = "9.1.0"
5+
distributionSha256Sum = "b84e04fa845fecba48551f425957641074fcc00a88a84d2aae5808743b35fc85"
6+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
toolchainVersion=21

gradle/wrapper/gradle-wrapper.jar

44.4 KB
Binary file not shown.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionSha256Sum=b84e04fa845fecba48551f425957641074fcc00a88a84d2aae5808743b35fc85
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-all.zip
5+
networkTimeout=10000
6+
validateDistributionUrl=true
7+
zipStoreBase=GRADLE_USER_HOME
8+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)