diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
new file mode 100644
index 0000000..3b65e54
--- /dev/null
+++ b/.github/workflows/docs.yml
@@ -0,0 +1,141 @@
+name: Publish Docs
+
+on:
+ workflow_dispatch:
+ inputs:
+ version:
+ description: 'Docs version to publish (e.g. 2.1.0)'
+ required: true
+ type: string
+
+ workflow_call:
+ inputs:
+ version:
+ description: 'Docs version to publish (e.g. 2.1.0)'
+ required: true
+ type: string
+ secrets:
+ MAVEN_USERNAME:
+ required: true
+ MAVEN_PASSWORD:
+ required: true
+
+jobs:
+ docs:
+ name: Build JavaDoc & Update gh-pages
+ runs-on: ubuntu-latest
+ permissions:
+ contents: write
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+
+ - name: Set up Temurin 21
+ uses: actions/setup-java@v4
+ with:
+ distribution: temurin
+ java-version: 21
+ cache: maven
+
+ - name: Build project (resolve deps + compile, skip tests)
+ run: mvn -B --settings .github/settings.xml clean verify -DskipTests
+ env:
+ MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
+ MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
+
+ # javadoc:aggregate gira sulla root del progetto.
+ # L'output viene scritto in target/site/apidocs/ (root), NON in flash/target/...
+ - name: Generate aggregated JavaDoc
+ run: mvn -B --settings .github/settings.xml javadoc:aggregate -DskipTests
+ env:
+ MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
+ MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
+
+ - name: Verify JavaDoc output exists
+ run: |
+ if [ ! -f "target/site/apidocs/index.html" ]; then
+ echo "ERROR: target/site/apidocs/index.html not found. JavaDoc generation failed."
+ exit 1
+ fi
+ echo "JavaDoc OK — $(find target/site/apidocs -name '*.html' | wc -l) HTML files generated."
+
+ - name: Checkout gh-pages
+ uses: actions/checkout@v4
+ with:
+ ref: gh-pages
+ path: gh-pages-out
+ token: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Copy JavaDoc to versioned folder and latest
+ run: |
+ VERSION=${{ inputs.version }}
+ # Versioned snapshot
+ mkdir -p gh-pages-out/javadoc/$VERSION
+ cp -r target/site/apidocs/. gh-pages-out/javadoc/$VERSION/
+ # Always-current alias
+ rm -rf gh-pages-out/latest
+ mkdir -p gh-pages-out/latest
+ cp -r target/site/apidocs/. gh-pages-out/latest/
+
+ - name: Regenerate index.html
+ run: |
+ cd gh-pages-out
+ python3 - <<'EOF'
+ import os, re
+
+ def version_key(v):
+ parts = re.findall(r'\d+', v)
+ return [int(p) for p in parts] if parts else [0]
+
+ versions = sorted(
+ [d for d in os.listdir("javadoc") if os.path.isdir(f"javadoc/{d}")],
+ key=version_key,
+ reverse=True
+ )
+
+ rows = "\n".join(
+ f'
{v}'
+ for v in versions
+ )
+
+ html = f"""
+
+
+
+
+ Flash JavaDoc
+
+
+
+ Flash — JavaDoc
+ Browse the published API documentation for each release.
+
+
+ """
+
+ with open("index.html", "w", encoding="utf-8") as f:
+ f.write(html)
+ print(f"index.html generated — {len(versions)} version(s): {versions}")
+ EOF
+
+ - name: Push gh-pages
+ run: |
+ cd gh-pages-out
+ git config user.name "github-actions[bot]"
+ git config user.email "github-actions[bot]@users.noreply.github.com"
+ git add -A
+ git diff --cached --quiet || git commit -m "docs(javadoc): publish ${{ inputs.version }}"
+ git push origin gh-pages
\ No newline at end of file
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index e623c29..6b31bd7 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -6,13 +6,12 @@ on:
- 'v*'
jobs:
+ # ── 1. Build, GPG-sign, deploy to Maven releases ──────────────────────────
release:
- name: Build, Sign, Deploy & Publish
+ name: Build, Sign & Deploy
runs-on: ubuntu-latest
permissions:
contents: write
- pages: write
- id-token: write
steps:
- name: Checkout
@@ -47,91 +46,25 @@ jobs:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
- - name: Generate aggregated JavaDoc
- run: |
- mvn -B --settings .github/settings.xml \
- -pl flash,flash-extensions -am \
- javadoc:aggregate -DskipTests
- env:
- MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
- MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
-
- - name: Checkout gh-pages
- uses: actions/checkout@v4
- with:
- ref: gh-pages
- path: gh-pages-out
- token: ${{ secrets.GITHUB_TOKEN }}
-
- - name: Copy JavaDoc to versioned folder
- run: |
- VERSION=${{ steps.version.outputs.VERSION }}
- mkdir -p gh-pages-out/javadoc/$VERSION
- cp -r flash/target/site/apidocs/. gh-pages-out/javadoc/$VERSION/
- rm -rf gh-pages-out/latest
- mkdir -p gh-pages-out/latest
- cp -r flash/target/site/apidocs/. gh-pages-out/latest/
-
- - name: Regenerate index.html
- run: |
- cd gh-pages-out
- python3 - <<'EOF'
- import os, re
-
- versions = sorted(
- [d for d in os.listdir("javadoc") if os.path.isdir(f"javadoc/{d}")],
- key=lambda v: [int(x) for x in re.sub(r'[^0-9.]', '', v).split('.') if x],
- reverse=True
- )
-
- rows = "\n".join(
- f' {v}'
- for v in versions
- )
-
- html = f"""
-
-
-
- Flash JavaDoc
-
-
-
- Flash — JavaDoc
- Browse the published API documentation for each release.
-
-
- """
-
- with open("index.html", "w") as f:
- f.write(html)
- print(f"index.html generated with {len(versions)} versions: {versions}")
- EOF
-
- - name: Push gh-pages
- run: |
- cd gh-pages-out
- git config user.name "github-actions[bot]"
- git config user.email "github-actions[bot]@users.noreply.github.com"
- git add -A
- git diff --cached --quiet || git commit -m "docs(javadoc): release ${{ steps.version.outputs.VERSION }}"
- git push origin gh-pages
-
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
- tag_name: v${{ steps.version.outputs.VERSION }}
- name: v${{ steps.version.outputs.VERSION }}
+ tag_name: ${{ github.ref_name }}
+ name: ${{ github.ref_name }}
generate_release_notes: true
draft: false
prerelease: false
+
+ outputs:
+ version: ${{ steps.version.outputs.VERSION }}
+
+ # ── 2. Publish JavaDoc (delegated to docs.yml — single source of truth) ───
+ docs:
+ name: Publish JavaDoc
+ needs: release
+ uses: ./.github/workflows/docs.yml
+ with:
+ version: ${{ needs.release.outputs.version }}
+ secrets:
+ MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
+ MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index ffe5512..4376af8 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,62 +4,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -69,7 +16,7 @@
-
+
@@ -144,64 +91,64 @@
- {
+ "keyToString": {
+ "Application.(dev) flash-bench.executor": "Run",
+ "Application.ExternalBenchmark (1).executor": "Run",
+ "Application.ExternalBenchmark.executor": "Run",
+ "Application.Main.executor": "Run",
+ "Application.MainAlt.executor": "Run",
+ "Application.dev.relism.bench.Main.executor": "Run",
+ "JUnit.RequestParserTest.executor": "Run",
+ "JUnit.RequestParserTest.headers_caseInsensitive.executor": "Debug",
+ "Maven.FlashPractice [test].executor": "Run",
+ "Maven.flash [compile].executor": "Run",
+ "Maven.flash [install].executor": "Run",
+ "Maven.flash [test].executor": "Run",
+ "Maven.flash [verify].executor": "Run",
+ "Maven.flash-bench [clean].executor": "Run",
+ "Maven.flash-bench [install].executor": "Run",
+ "Maven.flash-bench [package].executor": "Run",
+ "Maven.flash-bench [validate].executor": "Run",
+ "Maven.flash-ext-limiter [install].executor": "Run",
+ "Maven.flash-ext-limiter [package].executor": "Run",
+ "Maven.flash-ext-view [verify].executor": "Run",
+ "Maven.flash-parent [clean].executor": "Run",
+ "Maven.flash-parent [compile].executor": "Run",
+ "Maven.flash-parent [deploy].executor": "Run",
+ "Maven.flash-parent [install].executor": "Run",
+ "Maven.flash-parent [package].executor": "Run",
+ "Maven.flash-parent [test].executor": "Run",
+ "Maven.flash-parent [validate].executor": "Run",
+ "Maven.flash-parent [verify].executor": "Run",
+ "Maven.flash-web-bundler [test].executor": "Run",
+ "ModuleVcsDetector.initialDetectionPerformed": "true",
+ "RunOnceActivity.MCP Project settings loaded": "true",
+ "RunOnceActivity.ShowReadmeOnStart": "true",
+ "RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252": "true",
+ "RunOnceActivity.git.unshallow": "true",
+ "RunOnceActivity.typescript.service.memoryLimit.init": "true",
+ "SHARE_PROJECT_CONFIGURATION_FILES": "true",
+ "codeWithMe.voiceChat.enabledByDefault": "false",
+ "git-widget-placeholder": "master",
+ "ignore.virus.scanning.warn.message": "true",
+ "kotlin-language-version-configured": "true",
+ "last_opened_file_path": "C:/Users/elorc/Documents/Coding/Java/practice/Flash",
+ "node.js.detected.package.eslint": "true",
+ "node.js.detected.package.tslint": "true",
+ "node.js.selected.package.eslint": "(autodetect)",
+ "node.js.selected.package.tslint": "(autodetect)",
+ "nodejs_package_manager_path": "npm",
+ "npm.build.executor": "Run",
+ "onboarding.tips.debug.path": "C:/Users/elorc/Documents/Coding/Java/practice/Flash/flash-extensions/flash-ext-data/src/main/java/dev/relism/Main.java",
+ "project.structure.last.edited": "Modules",
+ "project.structure.proportion": "0.15",
+ "project.structure.side.proportion": "0.1150748",
+ "settings.editor.selected.configurable": "project.propVCSSupport.DirectoryMappings",
+ "ts.external.directory.path": "C:\\Users\\elorc\\Documents\\Coding\\Java\\practice\\Flash\\nuxt-shadcn-dashboard\\node_modules\\typescript\\lib",
+ "vue.rearranger.settings.migration": "true"
}
-}]]>
+}
@@ -346,7 +293,8 @@
-
+
+
@@ -460,7 +408,15 @@
1777451475753
-
+
+
+ 1778508899541
+
+
+
+ 1778508899541
+
+
@@ -506,7 +462,8 @@
-
+
+