You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by le...@apache.org on 2026/05/19 23:36:08 UTC

(datasketches-memory) branch update_7.0.X updated: Upload revised javadoc.yml

This is an automated email from the ASF dual-hosted git repository.

leerho pushed a commit to branch update_7.0.X
in repository https://gitbox.apache.org/repos/asf/datasketches-memory.git


The following commit(s) were added to refs/heads/update_7.0.X by this push:
     new 13673110 Upload revised javadoc.yml
13673110 is described below

commit 136731107d0c3ba214d56741ab8b586c3c429272
Author: Lee Rhodes <le...@gmail.com>
AuthorDate: Tue May 19 16:36:02 2026 -0700

    Upload revised javadoc.yml
---
 .github/workflows/javadoc.yml | 78 ++++++++++++++++++++-----------------------
 1 file changed, 36 insertions(+), 42 deletions(-)

diff --git a/.github/workflows/javadoc.yml b/.github/workflows/javadoc.yml
index c50d7262..8abe1409 100644
--- a/.github/workflows/javadoc.yml
+++ b/.github/workflows/javadoc.yml
@@ -1,34 +1,21 @@
-name: Deploy Versioned Javadoc (Manual Trigger)
+name: Stage for Review the Versioned Javadocs (Manual Trigger)
 
-# 1. Select the target TAG where to run the workflow from.
-#    This TAG name will become the subdirectory under branch gh-pages/docs/${TAG}
-#    where you will copy the javadocs to.
-#    The gh-pages/docs branch/folder must exist.
-
-# 2. Run the javadoc.yml workflow manually via Workflow Dispatch on GitHub 
-#    and provide the version tag (e.g., 7.0.0).
-
-# 3. Once it finishes, click on the completed run page. 
-#    At the bottom under the Artifacts section, will be a downloadable 
-#    ZIP file named versioned-javadocs-7.0.0.
-
-# 4. Download that ZIP to your local machine.
-
-# 5. Extract it directly into your local gh-pages repository clone, 
-#    verify the HTML formatting locally in your browser, commit the changes, 
-#    and execute your git push origin gh-pages right from your terminal.
+# This workflow is triggered manually via Workflow Dispatch on GitHub.
+# It automatically extracts the project version from the root pom.xml 
+# of the branch or tag that you trigger this workflow from.
+# It compiles the modules, and packages the javadocs into a structured ZIP.
+#
+# To deploy:
+# 1. Kick off the workflow on your chosen branch or tag.
+# 2. Download the resulting versioned-javadocs-*.zip from the run summary.
+# 3. You have 30 days to download before they are deleted from the server.
+# 4. Extract it directly into your local gh-pages repository clone and push.
 #
 # (Note: this is much safer than having to manage granting write permissions 
 # to the runners to access remote production branches)
 
-
 on:
   workflow_dispatch:
-    inputs:
-      tag_ref:
-        description: 'Existing Git Tag to package (e.g., 7.0.0):'
-        required: true
-        default: '99.0.0' # unlikely to conflict if accidentally used. Can be left blank
 
 jobs:
   build-and-package-javadoc:
@@ -37,13 +24,13 @@ jobs:
       contents: read
 
     steps:
-      - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
+      - name: 1. Checkout Current (triggered) Workspace Context
         uses: actions/checkout@v5
         with:
-          ref: ${{ github.event.inputs.tag_ref }}  # from manual trigger input
+          ref: ${{ github.ref }}
           fetch-depth: 0
 
-      - name: Set up JDK 25 for Host use
+      - name: 2. Set up JDK 25 for Host use
         uses: actions/setup-java@v5
         with:
           java-version: '25'
@@ -52,35 +39,42 @@ jobs:
           architecture: x64
           cache: 'maven'
 
-      - name: Pre-compile and Generate Java 11 Javadoc
+      - name: 3. Extract POM Project Version
+        id: get-version
+        run: |
+          # Query the clean version string from the Maven reactor model
+          POM_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
+          echo "Discovered Project Version: $POM_VERSION"
+          
+          # Expose it globally to the rest of the workflow execution environment
+          echo "POM_VERSION=$POM_VERSION" >> $GITHUB_ENV
+
+      - name: 4.Compile and Generate Java 11 Module Javadoc
         run: |
           echo "Generating Javadoc for Java 11 Module..."
           mvn clean compile javadoc:javadoc -pl datasketches-memory-java11
 
-      - name: Pre-compile and Generate Java 17/21 Javadoc
+      - name: 5.Compile and Generate Java 17/21 Module Javadoc
         run: |
           echo "Generating Javadoc for Java 17/21 Module..."
           mvn compile javadoc:javadoc -pl datasketches-memory-java17_21
 
-      - name: Stage Artifacts for Delivery
+      - name: 6. Stage Artifacts for Review
         run: |
-          TAG="${{ github.event.inputs.tag_ref }}"
-          STAGE_DIR="javadoc-staging/docs/${TAG}"
-
-          echo "Creating structured staging directories..."
-          mkdir -p "${STAGE_DIR}/datasketches-memory-java11-${TAG}"
-          mkdir -p "${STAGE_DIR}/datasketches-memory-java17_21-${TAG}"
-
+          STAGE_DIR="javadoc-staging/docs/${{ env.POM_VERSION }}"
+          echo "Creating structured staging directories for version ${{ env.POM_VERSION }}..."
+          mkdir -p "${STAGE_DIR}/datasketches-memory-java11-${{ env.POM_VERSION }}"
+          mkdir -p "${STAGE_DIR}/datasketches-memory-java17_21-${{ env.POM_VERSION }}"
+          
           echo "Copying generated HTML assets into staging..."
           cp -r datasketches-memory-java11/target/site/apidocs/* \
-            "${STAGE_DIR}/datasketches-memory-java11-${TAG}/"
-
+            "${STAGE_DIR}/datasketches-memory-java11-${{ env.POM_VERSION }}/"
           cp -r datasketches-memory-java17_21/target/site/apidocs/* \
-            "${STAGE_DIR}/datasketches-memory-java17_21-${TAG}/"
+            "${STAGE_DIR}/datasketches-memory-java17_21-${{ env.POM_VERSION }}/"
 
-      - name: Upload Generated Javadocs as Workflow Artifact
+      - name: 7. Upload Generated Javadocs as Workflow Zip Artifact
         uses: actions/upload-artifact@v4
         with:
-          name: versioned-javadocs-${{ github.event.inputs.tag_ref }}
+          name: versioned-javadocs-${{ env.POM_VERSION }}
           path: javadoc-staging/
           retention-days: 30


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org