4646# run: cmake --build build -j4 --config Release
4747
4848 - name : mkdocs
49- run : ENABLE_PDF_EXPORT=0 mkdocs build
49+ run : CI=1 mkdocs build
5050
5151 - name : COPY CNAME
5252 run : cp CNAME ./site
5959 with :
6060 github_token : ${{ secrets.GITHUB_TOKEN }}
6161 publish_dir : ./site
62+
63+ - name : Semantic Release
64+ id : semantic
65+ uses : cycjimmy/semantic-release-action@v2
66+ with :
67+ semantic_version : 19.0.2
68+ # You can specify specifying version range for the extra plugins if you prefer.
69+ extra_plugins : |
70+ @semantic-release/changelog@6.0.2
71+ @semantic-release/git@10.0.1
72+ @semantic-release/commit-analyzer@9.0.2
73+ @semantic-release/github@8.0.7
74+ @semantic-release/npm@9.0.1
75+ @semantic-release/release-notes-generator@10.0.3
76+ env :
77+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
78+
79+ - name : Version
80+ id : version
81+ run : |
82+ if [[ ${{ steps.semantic.outputs.new_release_published }} == true ]]
83+ then
84+ export version=v${{ steps.semantic.outputs.new_release_version }}
85+ else
86+ export version=`git describe --abbrev=0 --tags $tag`
87+ fi
88+ echo "version=${version}" >> $GITHUB_OUTPUT
89+
90+ - name : Latest pdf
91+ uses : ncipollo/release-action@v1
92+ if : github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' # || startsWith(github.ref, 'refs/tags')
93+ with :
94+ allowUpdates : true
95+ artifacts : site/pdf/document.pdf
96+ tag : latest
97+
98+ - name : Versined pdf
99+ uses : ncipollo/release-action@v1
100+ if : github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' # || startsWith(github.ref, 'refs/tags')
101+ with :
102+ allowUpdates : true
103+ artifacts : site/pdf/document.pdf
104+ tag : ${{ steps.version.outputs.version }}
0 commit comments