Skip to content

Commit 2c0004d

Browse files
authored
Merge pull request #16 from hooyuser/hooyuser-patch-2
Update generate_release_pdf.yml
2 parents 781cc54 + 2c3dfba commit 2c0004d

File tree

1 file changed

+8
-33
lines changed

1 file changed

+8
-33
lines changed
Lines changed: 8 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,15 @@
11
name: Generate Release PDF
2-
on:
2+
3+
on:
34
push:
45
branches:
56
- master
67
paths-ignore:
7-
- '.github/**'
8-
- '.gitignore'
98
- '**.md'
9+
- '.gitignore'
10+
1011
jobs:
11-
build_latex_and_release:
12-
runs-on: ubuntu-latest
13-
steps:
14-
- name: Set up Git repository
15-
uses: actions/checkout@v2
16-
- name: Compile LaTeX document
17-
uses: xu-cheng/latex-action@v2
18-
with:
19-
root_file: Solution_to_Algebra_Chapter_0.tex
20-
- name: Delete old Release
21-
uses: actions/github-script@v5
22-
with:
23-
github-token: ${{secrets.GITHUB_TOKEN}}
24-
script: |
25-
const { owner, repo } = context.repo
26-
try {
27-
const { data: { id } } = await github.rest.repos.getLatestRelease({ owner, repo })
28-
await github.rest.repos.deleteRelease({ owner, repo, release_id: id })
29-
} catch {}
30-
- name: Generate release tag
31-
id: tag
32-
run: |
33-
echo "::set-output name=release_tag::latest_$(date +"%Y-%m-%d_%H-%M")"
34-
- name: Release
35-
uses: softprops/action-gh-release@v1
36-
with:
37-
name: latest version
38-
body: Latest version of `Solution_to_Algebra_Chapter_0.pdf`
39-
tag_name: ${{ steps.tag.outputs.release_tag }}
40-
files: Solution_to_Algebra_Chapter_0.pdf
12+
release_pdf:
13+
uses: hooyuser/pdf-ci-templates/.github/workflows/pdf-release.yml@main
14+
with:
15+
TEX_FILE_NAME: Solution_to_Algebra_Chapter_0

0 commit comments

Comments
 (0)