From 54ac7a3ad840748c5f820e474a73946eee988af8 Mon Sep 17 00:00:00 2001 From: Zeping Lee Date: Wed, 10 May 2023 16:53:32 +0800 Subject: [PATCH] Bump to v3.3.4 --- .github/{workflows => }/install-packages.sh | 0 .github/workflows/main.yml | 56 +++++++++++++++++++++ .github/workflows/test.yml | 20 -------- CHANGELOG.md | 5 +- build.lua | 5 +- ustcthesis-doc.tex | 4 +- ustcthesis.cls | 6 +-- 7 files changed, 69 insertions(+), 27 deletions(-) rename .github/{workflows => }/install-packages.sh (100%) create mode 100644 .github/workflows/main.yml delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/install-packages.sh b/.github/install-packages.sh similarity index 100% rename from .github/workflows/install-packages.sh rename to .github/install-packages.sh diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..b6b64de --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,56 @@ +name: Test and release + +on: + push: + pull_request: + +jobs: + + test: + if: "!contains(github.event.head_commit.message, 'ci skip')" + name: Test + runs-on: ubuntu-latest + container: tunathu/thuthesis-test-env + steps: + + - name: Checkout + uses: actions/checkout@v3 + + - name: Install required packages + run: bash .github/install-packages.sh + + - name: Test thesis + run: make main + + - name: Test doc + run: make doc + + - name: Run l3build + run: make test + + - name: Archive failed test output + if: ${{ failure() }} + uses: actions/upload-artifact@v3 + with: + name: testfiles + path: build/**/*.diff + retention-days: 3 + + + release: + if: startsWith(github.ref, 'refs/tags/v') + needs: test + name: Release on GitHub + runs-on: ubuntu-latest + steps: + + - name: Checkout + uses: actions/checkout@v3 + + - name: Extract release notes + run: awk '/^#+ \[/ { if (p) { exit }; if ($2 != "[Unreleased]") { p=1 } } p' CHANGELOG.md > release-notes.md + + - name: Create GitHub release + uses: ncipollo/release-action@v1 + with: + bodyFile: "release-notes.md" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index bff7b39..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Test - -on: [push] - -jobs: - test: - - runs-on: ubuntu-latest - if: "!contains(github.event.head_commit.message, 'ci skip')" - container: tunathu/thuthesis-test-env - steps: - - uses: actions/checkout@v3 - - name: Install required packages - run: bash .github/workflows/install-packages.sh - - name: Test thesis - run: make main - - name: Test doc - run: make doc - - name: l3build check - run: make test diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d7a9ba..6cccb86 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [3.3.4] - 2023-05-10 + ### Changed - 本科生的正文不再另页右页(`\cleardoublepage`)。 @@ -304,7 +306,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - 优化图注、算法的行距。 - 二级以下节标题编号下采用“1.”、“(1)”、“①”。 -[Unreleased]: https://github.com/ustctug/ustcthesis/compare/v3.3.3...HEAD +[Unreleased]: https://github.com/ustctug/ustcthesis/compare/v3.3.4...HEAD +[3.3.4]: https://github.com/ustctug/ustcthesis/compare/v3.3.3...v3.3.4 [3.3.3]: https://github.com/ustctug/ustcthesis/compare/v3.3.2...v3.3.3 [3.3.2]: https://github.com/ustctug/ustcthesis/compare/v3.3.1...v3.3.2 [3.3.1]: https://github.com/ustctug/ustcthesis/compare/v3.3.0...v3.3.1 diff --git a/build.lua b/build.lua index bc94bfc..d04c28b 100644 --- a/build.lua +++ b/build.lua @@ -34,6 +34,10 @@ function update_tag(file, content, tagname, tagdate) local url = "https://github.com/ustctug/ustcthesis" local date = string.gsub(tagdate, "%-", "/") + content = string.gsub(content, + "Copyright %(C%) (%d%d%d%d)%-%d%d%d%d", + "Copyright (C) %1-" .. os.date("%Y")) + if string.match(file, "%.cls$") then content = string.gsub(content, "\\newcommand\\ustcthesisversion{[0-9.]+", "\\newcommand\\ustcthesisversion{" .. tagname) @@ -47,7 +51,6 @@ function update_tag(file, content, tagname, tagdate) elseif string.match(file, "CHANGELOG.md") then local previous = string.match(content, "/compare/v(.*)%.%.%.HEAD") - print(previous) if tagname == previous then return content end content = string.gsub(content, "## %[Unreleased%]", diff --git a/ustcthesis-doc.tex b/ustcthesis-doc.tex index 9e4a14c..4c3554a 100644 --- a/ustcthesis-doc.tex +++ b/ustcthesis-doc.tex @@ -3,7 +3,7 @@ % !TeX spellcheck = en_US % -% Copyright (C) 2015-2022 by USTC TeX Users Group +% Copyright (C) 2015-2023 by USTC TeX Users Group % % This file may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3c @@ -113,7 +113,7 @@ \title{\cls{ustcthesis} 使用说明} \author{Zeping Lee\thanks{zepinglee AT gmail.com} \and seisman\thanks{seisman.info AT gmail.com} } -\date{v3.3.3\qquad 2022-05-17} +\date{v3.3.4\qquad 2023-05-10} \maketitle diff --git a/ustcthesis.cls b/ustcthesis.cls index bd766e8..fa8e12c 100644 --- a/ustcthesis.cls +++ b/ustcthesis.cls @@ -1,5 +1,5 @@ % -% Copyright (C) 2015-2022 by USTC TeX Users Group +% Copyright (C) 2015-2023 by USTC TeX Users Group % % This file may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3c @@ -11,8 +11,8 @@ % \NeedsTeXFormat{LaTeX2e}[2017/04/15] -\newcommand\ustcthesisversion{3.3.3} -\ProvidesClass{ustcthesis}[2022/05/17 {\ustcthesisversion} USTC thesis template] +\newcommand\ustcthesisversion{3.3.4} +\ProvidesClass{ustcthesis}[2023/05/10 {\ustcthesisversion} USTC thesis template] % 报错和警告 \newcommand\ustc@error[1]{%