3838 description : Create a GitHub release
3939 type : boolean
4040 default : true
41+ gh-release-use-changelog-builder :
42+ required : false
43+ description : Use release-changelog-builder-action to dynamically build changelog
44+ type : boolean
45+ default : true
46+ gh-release-changelog-config :
47+ required : false
48+ description : Path to changelog builder configuration file
49+ type : string
50+ default : " .github/workflows/config/changelog-config.json"
51+ gh-release-from-tag :
52+ required : false
53+ description : Starting tag for changelog builder (leave empty for auto-detect)
54+ type : string
55+ default : " "
4156 secrets :
4257 TWINE_PASSWORD :
4358 required : true
@@ -338,12 +353,51 @@ jobs:
338353 ref : ${{ inputs.release-ref }}
339354 token : ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
340355
356+ - name : Determine fromTag for changelog
357+ id : determine-from-tag
358+ if : inputs.gh-release-use-changelog-builder == true
359+ run : |
360+ cd ${{ github.run_id }}
361+
362+ # If gh-release-from-tag is provided, use it
363+ if [[ -n "${{ inputs.gh-release-from-tag }}" ]]; then
364+ FROM_TAG="${{ inputs.gh-release-from-tag }}"
365+ echo "Using provided fromTag: $FROM_TAG"
366+ else
367+ # Get the most recent tag
368+ FROM_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
369+ if [[ -z "$FROM_TAG" ]]; then
370+ echo "No previous tags found, leaving fromTag empty"
371+ else
372+ echo "Auto-detected most recent tag: $FROM_TAG"
373+ fi
374+ fi
375+
376+ echo "from-tag=$FROM_TAG" >> $GITHUB_OUTPUT
377+
378+ - name : Build Changelog
379+ id : build-changelog
380+ if : inputs.gh-release-use-changelog-builder == true
381+ uses : mikepenz/release-changelog-builder-action@v6.1.0
382+ env :
383+ GITHUB_TOKEN : ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
384+ with :
385+ configuration : ${{ github.run_id }}/${{ inputs.gh-release-changelog-config }}
386+ owner : ${{ github.repository_owner }}
387+ repo : ${{ github.event.repository.name }}
388+ ignorePreReleases : " false"
389+ failOnError : " false"
390+ fromTag : ${{ steps.determine-from-tag.outputs.from-tag }}
391+ toTag : ${{ inputs.release-ref }}
392+ mode : ${{ inputs.gh-release-changelog-mode }}
393+
341394 - name : Create release
342395 id : version-number
343396 env :
344397 SHA : ${{ inputs.release-ref }}
345398 GH_TOKEN : ${{ secrets.PAT }}
346399 IS_DRY_RUN : ${{ inputs.dry-run }}
400+ BUILT_CHANGELOG : ${{ steps.build-changelog.outputs.changelog }}
347401 run : |
348402 cd ${{ github.run_id }}
349403
@@ -352,7 +406,10 @@ jobs:
352406 IS_PRERELEASE=$([[ "$IS_RELEASE_CANDIDATE" == "true" || "$IS_ALPHA" == "true" ]] && echo "true" || echo "false")
353407 NAME="NVIDIA $PROJECT_NAME ${VERSION}"
354408
355- if [[ "$IS_RELEASE_CANDIDATE" == "true" ]]; then
409+ # Use built changelog if available, otherwise fall back to CHANGELOG.md
410+ if [[ -n "$BUILT_CHANGELOG" ]]; then
411+ CHANGELOG="$BUILT_CHANGELOG"
412+ elif [[ "$IS_RELEASE_CANDIDATE" == "true" ]]; then
356413 DATE=$(date +"%Y-%m-%d")
357414 CHANGELOG="Prerelease: $NAME ($DATE)"
358415 else
@@ -395,6 +452,16 @@ jobs:
395452 eval "$CMD"
396453 fi
397454
455+ publish-docs :
456+ needs : [bump-next-version, create-gh-release]
457+ uses : ./.github/workflows/release-docs.yml
458+ with :
459+ dry-run : ${{ inputs.dry-run }}
460+ publish-as-latest : true
461+ docs-version-override : ${{ needs.bump-next-version.outputs.release-version }}
462+ build-docs-ref : ${{ inputs.release-ref }}
463+ secrets : inherit
464+
398465 notify :
399466 needs : [build-test-publish-wheels, create-gh-release]
400467 runs-on : ubuntu-latest
0 commit comments