File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6262 tag : ${{ steps.build.outputs.tag }}
6363 version : ${{ steps.build.outputs.version }}
6464 is_release : ${{ steps.build.outputs.is_release }}
65+ is_preview : ${{ steps.build.outputs.is_preview }}
6566
6667 test :
6768 needs : [ build ]
@@ -100,9 +101,16 @@ jobs:
100101 7z x artifact.tar -o'${{ needs.build.outputs.version }}'
101102 7z a docs.zip '${{ needs.build.outputs.version }}'
102103
104+ - name : Preview CHANGELOG
105+ if : needs.build.outputs.is_preview == 'True'
106+ run : |
107+ latest="$(gh release view --json tagName --jq .tagName)"
108+ python3 tools/ChangelogGenerator/changelog_generator.py --tag "${{ needs.build.outputs.tag }}" --latest "${latest}"
109+
103110 - if : needs.build.outputs.is_release == 'True'
104111 uses : softprops/action-gh-release@v2
105112 with :
106113 body_path : CHANGELOG.md
107114 tag_name : ${{ needs.build.outputs.tag }}
108115 files : github-pages/docs.zip
116+ prerelease : ${{ needs.build.outputs.is_preview == 'True' }}
Original file line number Diff line number Diff line change @@ -54,10 +54,12 @@ if (tags.Count is 3 or 4) // 非最新版本号
5454}
5555
5656var verStr = version . ToFullString ( ) ;
57+ var isPreview = version . ReleaseLabels . Any ( x => x . StartsWith ( "preview" , StringComparison . OrdinalIgnoreCase ) ) ;
5758TeeToGithubOutput (
5859 $ "tag={ tag } ",
5960 $ "version={ verStr } ",
6061 $ "is_release={ isRelease } ",
62+ $ "is_preview={ isPreview } ",
6163 $ "default_branch={ defaultBranch } "
6264 ) ;
6365StartProcess (
You can’t perform that action at this time.
0 commit comments