Skip to content

Commit

Permalink
[build] Rework Antora and publishing to allow JDK21 use
Browse files Browse the repository at this point in the history
  • Loading branch information
chemicL committed Feb 18, 2025
1 parent 14719dd commit 491b68d
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 35 deletions.
65 changes: 36 additions & 29 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,30 +67,30 @@ jobs:
# JDK21 is used because the antora plugin requires a JDK17 compatible version.
# Each deploy job can then download the docs-zip to ./docs/build/distributions/ in order to let it be included in published artifacts.
# (see gradle/setup.gradle publications which includes docs zip file, if found from docs/build/distributions directory)
build-docs-zip:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Set up Ruby for asciidoctor-pdf
uses: ruby/setup-ruby@cacc9f1c0b3f4eb8a16a6bb0ed10897b43b9de49 # v1
with:
ruby-version: 3.3.0
- name: Install asciidoctor-pdf / rouge
run: gem install asciidoctor-pdf rouge
- name: Setup java 21 for antora
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4
with:
distribution: 'temurin'
java-version: '21'
- name: Build antora docs zip distribution for the current branch
run: ./gradlew docs
- name: Upload docs/build to current workflow run
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4
with:
name: ${{ env.DOCS_ZIP }}
path: ${{ env.DOCS_ZIP_PATH }}
retention-days: 3
if-no-files-found: error
# build-docs-zip:
# runs-on: ubuntu-22.04
# steps:
# - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
# - name: Set up Ruby for asciidoctor-pdf
# uses: ruby/setup-ruby@cacc9f1c0b3f4eb8a16a6bb0ed10897b43b9de49 # v1
# with:
# ruby-version: 3.3.0
# - name: Install asciidoctor-pdf / rouge
# run: gem install asciidoctor-pdf rouge
# - name: Setup java 21 for antora
# uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4
# with:
# distribution: 'temurin'
# java-version: '21'
# - name: Build antora docs zip distribution for the current branch
# run: ./gradlew docs
# - name: Upload docs/build to current workflow run
# uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4
# with:
# name: ${{ env.DOCS_ZIP }}
# path: ${{ env.DOCS_ZIP_PATH }}
# retention-days: 3
# if-no-files-found: error

#deploy the snapshot artifacts to Artifactory
deploySnapshot:
Expand All @@ -100,6 +100,13 @@ jobs:
if: needs.prepare.outputs.versionType == 'SNAPSHOT'
environment: snapshots
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Set up Ruby for asciidoctor-pdf
uses: ruby/setup-ruby@cacc9f1c0b3f4eb8a16a6bb0ed10897b43b9de49 # v1
with:
ruby-version: 3.3.0
- name: Install asciidoctor-pdf / rouge
run: gem install asciidoctor-pdf rouge
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4
- name: Setup JDK 8
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # tag=v3
Expand All @@ -118,11 +125,11 @@ jobs:
with:
distribution: 'temurin'
java-version: 21
- name: Download antora docs-zip
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4
with:
name: ${{ env.DOCS_ZIP }}
path: ${{ env.DOCS_ZIP_PATH }}
# - name: Download antora docs-zip
# uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4
# with:
# name: ${{ env.DOCS_ZIP }}
# path: ${{ env.DOCS_ZIP_PATH }}
- name: deploy
env:
ORG_GRADLE_PROJECT_artifactory_publish_username: ${{secrets.ARTIFACTORY_SNAPSHOT_USERNAME}}
Expand Down
2 changes: 1 addition & 1 deletion gradle/releaser.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ task printBuildNumber() {
}
}

if (project.hasProperty("artifactory_publish_password")) {
if (project.hasProperty("artifactory_publish_password") && project.hasProperty("artifactory_publish_contextUrl")) {
configure(rootProject) { p ->
apply plugin: "com.jfrog.artifactory"
def buildNumber = getOrGenerateBuildNumber()
Expand Down
6 changes: 1 addition & 5 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@ plugins {

rootProject.name = 'reactor'

include 'benchmarks', 'reactor-core', 'reactor-test', 'reactor-tools', 'reactor-core-micrometer'

if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17)) {
include 'docs'
}
include 'benchmarks', 'reactor-core', 'reactor-test', 'reactor-tools', 'reactor-core-micrometer', 'docs'

dependencyResolutionManagement {
versionCatalogs {
Expand Down

0 comments on commit 491b68d

Please sign in to comment.