latex-template

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 2702da72319e636de348b7b64cb7f86fe47104ca
parent 0a6771aaf967aa4d8e038ca91d2db961bc1960da
Author: minerva-jupiter <ryouturn@gmail.com>
Date:   Fri, 11 Apr 2025 21:38:03 +0900

add many actions

Diffstat:
A.github/workflows/build.yaml | 42++++++++++++++++++++++++++++++++++++++++++
D.github/workflows/latex.yml | 30------------------------------
2 files changed, 42 insertions(+), 30 deletions(-)

diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml @@ -0,0 +1,42 @@ +name: compile LaTeX and release PDF + +# トリガーは*.*.*のタグが付いたコミットがpushされた時 +on: + push: + tags: + - '*.*.*' + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Set up Git repository + uses: actions/checkout@v2 + # TeXをcompile + - name: compile latex document + uses: ./.github/actions + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # リリースを作成 + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false + # compileしたpdfをアップロード + - 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 + asset_name: main.pdf + asset_content_type: pdf diff --git a/.github/workflows/latex.yml b/.github/workflows/latex.yml @@ -1,30 +0,0 @@ -name: LaTeX compilation -on: - push: - branches: - - main -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Set up Git repository - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Merge main branch - run: | - git config user.name minerva_juppiter - git config user.email ryouturn@gmail.com - git fetch - git checkout pdf - git merge main - - name: Compile LaTeX document - uses: xu-cheng/latex-action@v2 - with: - root_file: - sample.tex - - name: Push PDF file - run: | - git add . - git commit -m "LaTeX compilation" - git push origin pdf