Skip to content
Snippets Groups Projects
Commit a0299d10 authored by HermitSun's avatar HermitSun
Browse files

chore: separate workflow to trigger tag event

parent 9c036977
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,7 @@ on:
push:
branches:
- master
pull_request:
branches:
- master
......@@ -29,38 +30,3 @@ jobs:
with:
name: PDF_${{ matrix.latex }}
path: njuthesis.pdf
release:
needs: build_latex
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Set up Git repository
uses: actions/checkout@v2
- name: Zip Release Source
run: |
zip -r njuthesis.zip . -x ".git/*" ".github/*" ".gitignore"
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: PDF_xelatex
- name: Zip CTAN Source
run: |
mkdir -p njuthesis/
cp njuthesis.pdf njuthesis/njuthesis.pdf
cp README.md njuthesis/README_ZH_CN.md
cp README_EN.md njuthesis/README.md
cp -r figure/ LICENSE njuthesis.dtx njuthesis/
zip -r njuthesis_ctan.zip njuthesis/
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
njuthesis.pdf
njuthesis.zip
njuthesis_ctan.zip
name: Release LaTeX document
on:
push:
tags:
- v*
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v2
- name: Compile to PDF
uses: HermitSun/latex-action@v3
with:
root_file: njuthesis.dtx
args: '-bibtex'
- name: Zip Release Source
run: |
zip -r njuthesis.zip . -x ".git/*" ".github/*" ".gitignore"
- name: Zip CTAN Source
run: |
mkdir -p njuthesis/
cp njuthesis.pdf njuthesis/njuthesis.pdf
cp README.md njuthesis/README_ZH_CN.md
cp README_EN.md njuthesis/README.md
cp -r figure/ LICENSE njuthesis.dtx njuthesis/
zip -r njuthesis_ctan.zip njuthesis/
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
njuthesis.pdf
njuthesis.zip
njuthesis_ctan.zip
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