Skip to content
Snippets Groups Projects
Commit 8975a52e authored by Lin Yinfeng's avatar Lin Yinfeng Committed by Yichen Zhao
Browse files

feat: 在 actions 中使用 artifact 创建 release

parent 05cae37a
No related branches found
No related tags found
No related merge requests found
name: Build LaTeX document
on:
push:
branches:
- master
tags:
- "!v*"
pull_request:
jobs:
......@@ -29,3 +25,20 @@ 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: Download artifact
uses: actions/download-artifact@v2
with:
name: PDF_xelatex
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
njuthesis.pdf
---
name: "tagged-release"
on:
push:
tags:
- "v*"
jobs:
tagged-release:
name: "Tagged Release"
runs-on: "ubuntu-latest"
strategy:
matrix:
latex: [xelatex]
steps:
- name: Set up Git repository
uses: actions/checkout@v2
- name: Compile to PDF
uses: HermitSun/latex-action@v3
with:
root_file: njuthesis.tex
latexmk_use_${{ matrix.latex }}: true
args: '-bibtex'
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
njuthesis.pdf
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