From ac984639c192466644bf68e8ed1d579b4308354d Mon Sep 17 00:00:00 2001
From: Yichen Zhao <njuzhaoyichen@gmail.com>
Date: Fri, 17 Sep 2021 19:55:14 +0800
Subject: [PATCH] =?UTF-8?q?chore:=20=E9=BB=98=E8=AE=A4test=20cls=E6=96=87?=
 =?UTF-8?q?=E4=BB=B6=EF=BC=8C=E4=B8=8D=E5=86=8D=E6=B5=8B=E8=AF=95=E7=BC=96?=
 =?UTF-8?q?=E8=AF=91doc?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .github/workflows/build.yml | 34 +++++++++++++++++++++++-----------
 1 file changed, 23 insertions(+), 11 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index cd082c8..74e20be 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -21,10 +21,16 @@ jobs:
       - name: Set up Git repository
         uses: actions/checkout@v2
 
+      - name: Github Action for LaTeX dtx to cls
+        uses: FengChendian/latex-dtx2cls-action@4.0.1
+        with:
+          root_file: njuthesis.dtx
+          working_directory: ./
+
       - name: Compile to PDF
         uses: HermitSun/latex-action@v3
         with:
-          root_file: njuthesis.dtx
+          root_file: njuthesis-sample.tex
           latexmk_use_${{ matrix.latex }}: true
           args: '-bibtex'
 
@@ -32,31 +38,37 @@ jobs:
         uses: actions/upload-artifact@v2
         with:
           name: PDF_${{ matrix.latex }}
-          path: njuthesis.pdf
+          path: |
+            njuthesis-sample.pdf
+            njuthesis.cls
 
   release:
     needs: build_latex
     runs-on: ubuntu-latest
+    strategy:
+      matrix:
+        latex: [xelatex]
     if: startsWith(github.ref, 'refs/tags/v')
     steps:
       - name: Set up Git repository
         uses: actions/checkout@v2
 
-      - name: Github Action for LaTeX dtx to cls
-        uses: FengChendian/latex-dtx2cls-action@v4
+      - name: Download artifact
+        uses: actions/download-artifact@v2
         with:
-          root_file: njuthesis.dtx
-          working_directory: ./
+          name: PDF_xelatex
 
       - name: Zip Release Source
         run: |
-          zip -r njuthesis.zip . -x ".git/*" "*.ins" ".github/*" ".gitignore" "*.dtx"
+          zip -r njuthesis.zip . -x ".git/*" "*.ins" ".github/*" ".gitignore" "*.dtx" ".pdf"
           
-      - name: Download artifact
-        uses: actions/download-artifact@v2
+      - name: Compile to PDF
+        uses: HermitSun/latex-action@v3
         with:
-          name: PDF_xelatex
-          
+          root_file: njuthesis.dtx
+          latexmk_use_${{ matrix.latex }}: true
+          args: '-bibtex'
+
       - name: Zip CTAN Source
         run: |
           mkdir -p njuthesis/
-- 
GitLab