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 : false
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_USERNAME :
4358 required : true
@@ -345,12 +360,51 @@ jobs:
345360 ref : ${{ inputs.release-ref }}
346361 token : ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
347362
363+ - name : Determine fromTag for changelog
364+ id : determine-from-tag
365+ if : inputs.gh-release-use-changelog-builder == true
366+ run : |
367+ cd ${{ github.run_id }}
368+
369+ # If gh-release-from-tag is provided, use it
370+ if [[ -n "${{ inputs.gh-release-from-tag }}" ]]; then
371+ FROM_TAG="${{ inputs.gh-release-from-tag }}"
372+ echo "Using provided fromTag: $FROM_TAG"
373+ else
374+ # Get the most recent tag
375+ FROM_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
376+ if [[ -z "$FROM_TAG" ]]; then
377+ echo "No previous tags found, leaving fromTag empty"
378+ else
379+ echo "Auto-detected most recent tag: $FROM_TAG"
380+ fi
381+ fi
382+
383+ echo "from-tag=$FROM_TAG" >> $GITHUB_OUTPUT
384+
385+ - name : Build Changelog
386+ id : build-changelog
387+ if : inputs.gh-release-use-changelog-builder == true
388+ uses : mikepenz/release-changelog-builder-action@v6.1.0
389+ env :
390+ GITHUB_TOKEN : ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
391+ with :
392+ configuration : ${{ github.run_id }}/${{ inputs.gh-release-changelog-config }}
393+ owner : ${{ github.repository_owner }}
394+ repo : ${{ github.event.repository.name }}
395+ ignorePreReleases : " false"
396+ failOnError : " false"
397+ fromTag : ${{ steps.determine-from-tag.outputs.from-tag }}
398+ toTag : ${{ inputs.release-ref }}
399+ mode : ${{ inputs.gh-release-changelog-mode }}
400+
348401 - name : Create release
349402 id : version-number
350403 env :
351404 SHA : ${{ inputs.release-ref }}
352405 GH_TOKEN : ${{ secrets.PAT }}
353406 IS_DRY_RUN : ${{ inputs.dry-run }}
407+ BUILT_CHANGELOG : ${{ steps.build-changelog.outputs.changelog }}
354408 run : |
355409 cd ${{ github.run_id }}
356410
@@ -359,7 +413,10 @@ jobs:
359413 IS_PRERELEASE=$([[ "$IS_RELEASE_CANDIDATE" == "true" || "$IS_ALPHA" == "true" ]] && echo "true" || echo "false")
360414 NAME="NVIDIA $PROJECT_NAME ${VERSION}"
361415
362- if [[ "$IS_RELEASE_CANDIDATE" == "true" ]]; then
416+ # Use built changelog if available, otherwise fall back to CHANGELOG.md
417+ if [[ -n "$BUILT_CHANGELOG" ]]; then
418+ CHANGELOG="$BUILT_CHANGELOG"
419+ elif [[ "$IS_RELEASE_CANDIDATE" == "true" ]]; then
363420 DATE=$(date +"%Y-%m-%d")
364421 CHANGELOG="Prerelease: $NAME ($DATE)"
365422 else
@@ -402,6 +459,16 @@ jobs:
402459 eval "$CMD"
403460 fi
404461
462+ publish-docs :
463+ needs : [bump-next-version, create-gh-release]
464+ uses : ./.github/workflows/release-docs.yml
465+ with :
466+ dry-run : ${{ inputs.dry-run }}
467+ publish-as-latest : true
468+ docs-version-override : ${{ needs.bump-next-version.outputs.release-version }}
469+ build-docs-ref : ${{ inputs.release-ref }}
470+ secrets : inherit
471+
405472 notify :
406473 needs : [build-test-publish-wheels, create-gh-release]
407474 runs-on : ubuntu-latest
0 commit comments