feat: 盲审模式可选择是否隐藏学校信息 (#185, #251) #215
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- v* | |
env: | |
CTAN_URL: https://mirrors.rit.edu/CTAN | |
PACKAGES: cm-unicode tex-gyre tex-gyre-math lexend xits natbib makeindex | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/v') | |
env: | |
SET_PATH: | | |
export PATH=/tmp/texlive/bin/x86_64-linux:$PATH | |
steps: | |
- name: Set up Git repository | |
uses: actions/checkout@v2 | |
- name: Set Version | |
run: echo "VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV | |
- name: Install TeX Live | |
run: | | |
${{ env.SET_PATH }} | |
wget ${{ env.CTAN_URL }}/systems/texlive/tlnet/install-tl-unx.tar.gz | |
tar -xzf install-tl-unx.tar.gz | |
cd install-tl-20* && ./install-tl --profile ../.github/workflows/texlive.profile | |
- name: Install latest njuthesis | |
run: | | |
${{ env.SET_PATH }} | |
tlmgr option repository ${{ env.CTAN_URL }}/systems/texlive/tlnet/ | |
tlmgr install xetex l3build | |
l3build install | |
cd scripts | |
bash download.sh ${{ env.CTAN_URL }} | |
cd data | |
wget https://raw.githubusercontent.com/stone-zeng/tl-depend-analysis/data/data/tl-depend.json | |
cd .. | |
python3 main.py --pkg "${{ env.PACKAGES }}" --exclude "njuthesis.cls" | |
tlmgr update --self --all --no-auto-install | |
- name: Install fonts | |
run: | | |
mkdir fonts | |
wget https://github.com/adobe-fonts/source-han-serif/raw/release/OTF/SimplifiedChinese/SourceHanSerifSC-SemiBold.otf | |
wget https://github.com/adobe-fonts/source-han-serif/raw/release/OTF/SimplifiedChinese/SourceHanSerifSC-Bold.otf | |
wget https://github.com/adobe-fonts/source-han-serif/raw/release/OTF/SimplifiedChinese/SourceHanSerifSC-Heavy.otf | |
wget https://github.com/be5invis/Iosevka/releases/download/v15.6.3/ttf-iosevka-15.6.3.zip | |
unzip ttf-iosevka-15.6.3.zip | |
cp *.otf /usr/share/fonts/ | |
cp iosevka-lightitalic.ttf /usr/share/fonts/ | |
cp iosevka-light.ttf /usr/share/fonts/ | |
cp iosevka-semibold.ttf /usr/share/fonts/ | |
chmod -x /usr/share/fonts/*.otf | |
chmod -x /usr/share/fonts/*.ttf | |
fc-cache -fv | |
- name: Zip CTAN package | |
run: | | |
${{ env.SET_PATH }} | |
l3build ctan | |
mv njuthesis-ctan.zip njuthesis-ctan-$VERSION.zip | |
mv njuthesis.pdf njuthesis-$VERSION.pdf | |
- name: Zip USER package | |
run: | | |
${{ env.SET_PATH }} | |
mv docs/* . | |
mv build/unpacked/* . | |
zip -r njuthesis-user-$VERSION.zip *.def njuthesis-sample* njuthesis.cls nju-*.pdf LICENSE CHANGELOG.md README.md | |
- uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
prerelease: true | |
files: | | |
njuthesis-v*.pdf | |
njuthesis-user-v*.zip | |
njuthesis-ctan-v*.zip |