Merge branch 'master' of github.com:paolini/AnalisiUno #312
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: compile, build, commit and release | |
on: [push] | |
jobs: | |
Compile-LaTeX: | |
runs-on: ubuntu-latest | |
steps: | |
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." | |
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: compile LaTeX project | |
uses: xu-cheng/latex-action@v2 | |
with: | |
root_file: AnalisiUno.tex | |
- name: upload PDF artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: AnalisiUno.pdf | |
path: AnalisiUno.pdf | |
- name: upload myaux artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: AnalisiUno.myaux | |
path: AnalisiUno.myaux | |
Build-Docs: | |
runs-on: ubuntu-latest | |
needs: Compile-LaTeX | |
if: startsWith(github.ref, 'refs/heads/') | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: download myaux artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: AnalisiUno.myaux | |
- name: make-docs | |
run: bash make-docs.sh | |
- name: commit doc changes | |
uses: EndBug/add-and-commit@v7 | |
with: | |
author_name: automated push | |
message: 'automatic creation of docs' | |
add: '["docs", "README.md"]' | |
- run: echo "🍏 This job's status is ${{ job.status }}." | |
Create-Release: | |
runs-on: ubuntu-latest | |
needs: Compile-LaTeX | |
if: startsWith(github.ref, 'refs/tags/20') # expect a tag like 2021-10-28 for releases | |
steps: | |
- name: download PDF artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: AnalisiUno.pdf | |
- name: create Release | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "AnalisiUno.pdf" | |
artifactContentType: "application/pdf" | |
body: "${{ github.event.head_commit.message }}" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- run: echo "this job's status is ${{ job.status }}." | |