Skip to content

Commit 04f2ce7

Browse files
committed
update to latest and greatest github actions
1 parent d5a3843 commit 04f2ce7

File tree

2 files changed

+47
-47
lines changed

2 files changed

+47
-47
lines changed

.github/workflows/build.yml

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

118
jobs:
12-
buildmultijdk:
13-
if: (!startsWith(github.ref, 'refs/tags/v'))
14-
runs-on: ubuntu-latest
15-
strategy:
16-
matrix:
17-
# test against latest update of some major Java version(s), as well as specific LTS version(s)
18-
java: [17, 21]
19-
name: Gradle Build without Publish
20-
steps:
21-
- uses: actions/checkout@v4
22-
- name: Setup git user
23-
run: |
24-
git config --global user.name "Nebula Plugin Maintainers"
25-
git config --global user.email "nebula-plugins-oss@netflix.com"
26-
- name: Set up JDKs
27-
uses: actions/setup-java@v4
28-
with:
29-
distribution: 'zulu'
30-
java-version: |
31-
17
32-
${{ matrix.java }}
33-
java-package: jdk
34-
- name: Setup Gradle
35-
uses: gradle/actions/setup-gradle@v5
36-
with:
37-
cache-overwrite-existing: true
38-
- name: Gradle build
39-
run: ./gradlew --stacktrace build
40-
env:
41-
JDK_VERSION_FOR_TESTS: ${{ matrix.java }}
429
validatepluginpublication:
43-
if: startsWith(github.ref, 'refs/tags/v')
4410
runs-on: ubuntu-latest
4511
name: Gradle Plugin Publication Validation
4612
env:
@@ -65,12 +31,10 @@ jobs:
6531
with:
6632
cache-overwrite-existing: true
6733
- name: Verify plugin publication
68-
if: |
69-
startsWith(github.ref, 'refs/tags/v') &&
70-
(!contains(github.ref, '-rc.'))
71-
run: ./gradlew --stacktrace -Dgradle.publish.key=${{ secrets.gradlePublishKey }} -Dgradle.publish.secret=${{ secrets.gradlePublishSecret }} -Prelease.useLastTag=true final publishPlugin --validate-only -x check -x signPluginMavenPublication
34+
if: (!contains(github.ref, '-rc.'))
35+
run: ./gradlew --stacktrace -Dgradle.publish.key=${{ secrets.gradlePublishKey }} -Dgradle.publish.secret=${{ secrets.gradlePublishSecret }} -Prelease.useLastTag=true final publishPlugin --validate-only -x check
7236
publish:
73-
if: startsWith(github.ref, 'refs/tags/v')
37+
if: github.event.base_ref == 'refs/heads/main' # tags must be pushed to main
7438
needs: validatepluginpublication
7539
runs-on: ubuntu-latest
7640
name: Gradle Build and Publish
@@ -99,13 +63,11 @@ jobs:
9963
uses: gradle/actions/setup-gradle@v5
10064
with:
10165
cache-overwrite-existing: true
66+
- name: Gradle build
67+
run: ./gradlew --stacktrace build
10268
- name: Publish candidate
103-
if: |
104-
startsWith(github.ref, 'refs/tags/v') &&
105-
contains(github.ref, '-rc.')
69+
if: contains(github.ref, '-rc.')
10670
run: ./gradlew --stacktrace -Prelease.useLastTag=true candidate
10771
- name: Publish release
108-
if: |
109-
startsWith(github.ref, 'refs/tags/v') &&
110-
(!contains(github.ref, '-rc.'))
111-
run: ./gradlew --stacktrace -Dgradle.publish.key=${{ secrets.gradlePublishKey }} -Dgradle.publish.secret=${{ secrets.gradlePublishSecret }} -Prelease.useLastTag=true final
72+
if: (!contains(github.ref, '-rc.'))
73+
run: ./gradlew --stacktrace -Dgradle.publish.key=${{ secrets.gradlePublishKey }} -Dgradle.publish.secret=${{ secrets.gradlePublishSecret }} -Prelease.useLastTag=true final

0 commit comments

Comments
 (0)