更新变更日志 #8
Workflow file for this run
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: Upload LaTeX Build | |
on: | |
push: | |
tags: | |
- "*" | |
jobs: | |
build_latex: | |
if: github.repository == 'Iydon/sustechthesis' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Git repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Tree All project | |
run: sudo apt install tree;tree | |
- name: Branch name | |
id: branch_name | |
run: | | |
echo "SOURCE_NAME=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT | |
echo "SOURCE_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT | |
echo "SOURCE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
- name: tag name output | |
run: | | |
echo SOURCE_NAME: ${SOURCE_NAME} | |
echo SOURCE_BRANCH: ${SOURCE_BRANCH} | |
echo SOURCE_TAG: ${SOURCE_TAG} | |
env: | |
SOURCE_NAME: ${{ steps.branch_name.outputs.SOURCE_NAME }} | |
SOURCE_BRANCH: ${{ steps.branch_name.outputs.SOURCE_BRANCH }} | |
SOURCE_TAG: ${{ steps.branch_name.outputs.SOURCE_TAG }} | |
- name: Compile LaTeX document | |
uses: xu-cheng/latex-action@v2 | |
with: | |
root_file: | | |
main.tex | |
slides.tex | |
latexmk_use_xelatex: true | |
- name: Tree All project | |
run: sudo apt install tree;tree | |
- name: zip the fonts | |
run: zip -r fonts.zip ./fonts | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: PDF_files | |
path: | | |
main.pdf | |
slides.pdf | |
- name: release | |
uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: "${{steps.branch_name.outputs.SOURCE_TAG}}" | |
prerelease: false | |
title: "${{steps.branch_name.outputs.SOURCE_TAG}}" | |
files: | | |
./main.pdf | |
./slides.pdf | |
./fonts.zip | |
./sustechthesis.cls | |
- name: look files | |
run: | | |
tree |