2024-02-05 15:15:32 +00:00
|
|
|
name: Compile Latex and Release PDF
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2024-02-05 17:10:06 +00:00
|
|
|
tags:
|
|
|
|
- 'v*'
|
2024-02-05 15:15:32 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build_latex:
|
|
|
|
runs-on: ubuntu-latest
|
2024-02-05 17:02:09 +00:00
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
pull-requests: write
|
2024-02-05 15:15:32 +00:00
|
|
|
steps:
|
|
|
|
- name: Set up Git repository
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Compile LaTeX document
|
|
|
|
uses: xu-cheng/latex-action@v3
|
|
|
|
with:
|
2024-02-05 16:44:43 +00:00
|
|
|
root_file: main.tex
|
2024-02-05 16:53:06 +00:00
|
|
|
- name: Create Release
|
|
|
|
id: create_release
|
|
|
|
uses: actions/create-release@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2024-02-05 15:15:32 +00:00
|
|
|
with:
|
2024-02-05 16:53:06 +00:00
|
|
|
tag_name: ${{ github.ref }}
|
|
|
|
release_name: Release ${{ github.ref }}
|
|
|
|
draft: false
|
|
|
|
prerelease: false
|
|
|
|
- name: Upload Release Asset
|
|
|
|
id: upload-release-asset
|
|
|
|
uses: actions/upload-release-asset@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
|
|
asset_path: ./main.pdf
|
2024-02-05 17:34:13 +00:00
|
|
|
asset_name: undergraduate-thesis-${{ github.ref }}.pdf
|
2024-02-05 16:53:06 +00:00
|
|
|
asset_content_type: pdf
|