From 6adf12512664bad4d569b62cd390c875ae430299 Mon Sep 17 00:00:00 2001 From: archxy <18185095@smail.nju.edu.cn> Date: Tue, 30 Nov 2021 11:46:50 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E9=87=8D=E6=96=B0=E6=9E=84=E5=BB=BA?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=8F=91=E5=B8=83Action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 75 +++++++++++++++++++++++++++++++++++++ docs/njuthesis-sample.tex | 2 +- source/njuthesis.dtx | 12 ++++-- 3 files changed, 84 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..cf59293 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,75 @@ +name: Build LaTeX document +on: + push: + branches: + - master + + tags: + - v* + + pull_request: + branches: + - master + +jobs: + release: + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/v') + steps: + - name: Set up Git repository + uses: actions/checkout@v2 + - name: Set Version + run: echo "VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV + + - name: Download njuvisual package (1/2) + uses: wei/curl@master + with: + args: -s -o "njuvisual.dtx" "https://mirror.nju.edu.cn/CTAN/macros/latex/contrib/njuvisual/njuvisual.dtx" + + - name: Download njuvisual package (2/2) + uses: wei/curl@master + with: + args: -s -o "njuvisual-curves.dtx" "https://mirror.nju.edu.cn/CTAN/macros/latex/contrib/njuvisual/njuvisual-curves.dtx" + + - name: Extract cls from njuthesis + uses: FengChendian/latex-dtx2cls-action@4.0.1 + with: + root_file: njuthesis.dtx + working_directory: ./source/ + + - name: Extract sty from njuvisual + uses: FengChendian/latex-dtx2cls-action@4.0.1 + with: + root_file: njuvisual.dtx + working_directory: ./ + + - name: Compile class documentation + uses: HermitSun/latex-action@v3 + with: + root_file: njuthesis.dtx + working_directory: ./source/ + latexmk_use_xelatex: true + args: "-bibtex" + pre_compile: "xetex njuthesis.dtx" + post_compile: "mv njuthesis.pdf njuthesis-$VERSION.pdf" + + - name: Zip Release Source + run: | + zip -r njuthesis-$VERSION.zip .vscode docs/chapters/ docs/njuthesis-sample.bib docs/njuthesis-sample.tex source/njuthesis.cls njuvisual.sty conf.txsprofile LICENSE Makefile README.md + + - name: Zip CTAN Source + run: | + mkdir -p njuthesis/ + cp source/njuthesis-$VERSION.pdf njuthesis/njuthesis.pdf + cp source/README-CTAN.md njuthesis/README.md + cp LICENSE source/njuthesis.dtx source/njuthesis.ins njuthesis/ + zip -r njuthesis-ctan-$VERSION.zip njuthesis/ + + - uses: "marvinpinto/action-automatic-releases@latest" + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + prerelease: false + files: | + source/njuthesis-v*.pdf + njuthesis-v*.zip + njuthesis-ctan-v*.zip diff --git a/docs/njuthesis-sample.tex b/docs/njuthesis-sample.tex index 7ed7a7f..df981f0 100644 --- a/docs/njuthesis-sample.tex +++ b/docs/njuthesis-sample.tex @@ -1,7 +1,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % NJU Thesis % 鍗椾含澶у姣曚笟璁烘枃LaTeX妯℃澘 -% Version 0.11.0 (2021-10-01) +% Version 0.12.0 (2021-11-30) % % 璇峰叧娉ㄩ」鐩湴鍧€浠ヨ幏鍙栨渶鏂板彉鍖� % https://github.com/nju-lug/NJUThesis diff --git a/source/njuthesis.dtx b/source/njuthesis.dtx index 573a6a2..926b68a 100644 --- a/source/njuthesis.dtx +++ b/source/njuthesis.dtx @@ -105,7 +105,7 @@ through XeTeX. % %<class>\NeedsTeXFormat{LaTeX2e} %<class>\RequirePackage{expl3} -%<class>\GetIdInfo $Id: njuthesis.dtx 0.11.3 2021-11-23 14:30:00 +0800 NJU LUG <nju.lug@yaoge123.cn> $ +%<class>\GetIdInfo $Id: njuthesis.dtx 0.12.0 2021-11-30 11:30:00 +0800 NJU LUG <nju.lug@yaoge123.cn> $ %<class> { Thesis template for Nanjing University } %<class>\ProvidesExplClass{njuthesis} %<class>{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} @@ -135,7 +135,7 @@ through XeTeX. % Nanjing University Linux User Group % \thanks{E-mail: \href{mailto:nju.lug@yaoge123.cn}{nju.lug@yaoge123.cn}}} % -% \date{v0.11.3 \\ Released 2021-11-23} +% \date{v0.12.0 \\ Released 2021-11-30} % % \changes{v0.1}{2021/09/04}{寮€濮嬪紑鍙戙€倉 % \changes{v0.2}{2021/09/07}{鍒濇鎼缓浜嗗彲鐢ㄧ殑妯℃澘銆倉 @@ -152,6 +152,7 @@ through XeTeX. % \changes{v0.9}{2021/09/15}{杩涗竴姝ュ畬鍠勬枃妗c€倉 % \changes{v0.10}{2021/09/24}{鍒犻櫎浜嗙敓鎴愯嚜杩版枃浠剁殑浠g爜銆倉 % \changes{v0.12}{2021/11/28}{鍒犻櫎鍐呯疆鐨� \pkg{njuvisual} 浠g爜銆倉 +% \changes{v0.12}{2021/11/29}{鏇存柊浜嗚鏄庢枃妗e皝闈㈣璁°€倉 % % \maketitle % @@ -183,6 +184,7 @@ through XeTeX. % % \clearpage % +% \setcounter{tocdepth}{4} % \tableofcontents % % \clearpage @@ -242,12 +244,14 @@ through XeTeX. % % \subsubsection{鑷姩瀹夎} % -% \pkg{njuthesis}宸茬粡浜�2021骞�9鏈�12鏃href{https://ctan.org/pkg/njuthesis}{鍙戝竷鍦–TAN}锛圕omprehensive \hologo{TeX} Archive Network锛夛紝灏嗗湪鏄庡勾杩涘叆\hologo{TeX}\,Live 2022銆� +% \href{https://ctan.org/pkg/njuthesis}{\cls{njuthesis}} 宸茬粡浜�2021骞�9鏈�12鏃ュ彂甯冨湪CTAN锛圕omprehensive \hologo{TeX} Archive Network锛夛紝灏嗗湪鏄庡勾杩涘叆\hologo{TeX}\,Live 2022銆� +% \href{https://ctan.org/pkg/njuvisual}{\pkg{njuvisual}} 涔熷凡浜庡悓骞�11鏈�28鏃ュ彂甯冦€� % 鐩墠锛屽崡澶hologo{TeX}宸查缃湰妯℃澘锛岃瑙乗ref{subsec:onlinecompile}銆� % 鎮ㄥ彲浠ラ€氳繃 \hologo{TeX}\,Live Manager 鎴栬€� \hologo{MiKTeX} Console 绛� -% 鍥惧舰鍖栧寘绠$悊鍣ㄧ洿鎺ュ畨瑁呭苟浣跨敤鏈€鏂扮殑绋冲畾鐗堬紝涔熷彲浠ヤ娇鐢� \pkg{tlmgr} +% 鍥惧舰鍖栧寘绠$悊鍣ㄧ洿鎺ュ畨瑁呭苟浣跨敤浠ヤ笂涓や釜瀹忓寘鏈€鏂扮殑绋冲畾鐗堬紝涔熷彲浠ヤ娇鐢� \pkg{tlmgr} % \begin{ctexexam} % tlmgr install njuthesis +% tlmgr install njuvisual % \end{ctexexam} % % 鎴戜滑寮虹儓寤鸿浣跨敤杩欎竴绫诲畨瑁呮柟寮忋€� -- GitLab