Skip to content
Snippets Groups Projects
Commit 6adf1251 authored by archxy's avatar archxy
Browse files

chore: 重新构建自动发布Action

parent 1f02d178
No related branches found
Tags v0.11.1
No related merge requests found
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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% NJU Thesis
% 南京大学毕业论文LaTeX模板
% Version 0.11.0 (2021-10-01)
% Version 0.12.0 (2021-11-30)
%
% 请关注项目地址以获取最新变化
% https://github.com/nju-lug/NJUThesis
......
......@@ -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}{进一步完善文档。}
% \changes{v0.10}{2021/09/24}{删除了生成自述文件的代码。}
% \changes{v0.12}{2021/11/28}{删除内置的 \pkg{njuvisual} 代码。}
% \changes{v0.12}{2021/11/29}{更新了说明文档封面设计。}
%
% \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}{发布在CTAN}(Comprehensive \hologo{TeX} Archive Network),将在明年进入\hologo{TeX}\,Live 2022。
% \href{https://ctan.org/pkg/njuthesis}{\cls{njuthesis}} 已经于2021年9月12日发布在CTAN(Comprehensive \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}
%
% 我们强烈建议使用这一类安装方式。
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment