Skip to content

Commit

Permalink
Merge pull request #10 from Certseeds/master
Browse files Browse the repository at this point in the history
add release auto produce.
  • Loading branch information
Certseeds authored May 8, 2021
2 parents 1288982 + c1addea commit 9a40180
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 0 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
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@v2
with:
submodules: true

- name: Tree All project
run: sudo apt install tree;tree

- name: Branch name
id: branch_name
run: |
echo ::set-output name=SOURCE_NAME::${GITHUB_REF#refs/*/}
echo ::set-output name=SOURCE_BRANCH::${GITHUB_REF#refs/heads/}
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
- name: tag name output
run: |
echo ${SOURCE_NAME};echo ${SOURCE_BRANCH};echo ${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@v2
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
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,13 @@ Please read the [document](https://github.com/Iydon/sustechthesis/blob/master/ma
- Or, use `latexmk`
- Build: `latexmk main`
- Clean: `latexmk -c main`

# Attention

[Main.pdf](./main.pdf) or [Slides.pdf](Slides.pdf) Maybe not the lastest version, Please Look the newest in [Github Actions](https://github.com/Iydon/sustechthesis/actions) pages' latest workflow

# Release

Release can be produce by push a tag

PS: `git push --tag` only push tag, should work after `git push`

0 comments on commit 9a40180

Please sign in to comment.