Version 7.2.3. #154
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: Build the LaTeX template | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
env: | |
VERSION_FILE: NOVAthesisFiles/nt-version.sty | |
EMAIL_GITHUB: [email protected] | |
USERNAME_GITHUB: joaomlourenco | |
permissions: write-all | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: github.actor != 'my_bot_account' | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v3 | |
with: | |
ref: main | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract version number from nt-version.sty | |
run: | | |
version=$(grep novathesisversion $VERSION_FILE | cut -d "{" -f3 | cut -d "}" -f1) | |
echo "Version number is $version" | |
- name: Compile the LaTeX template | |
uses: xu-cheng/texlive-action/full@v1 | |
with: | |
run: bash .Build/build.sh | |
- name: Upload the template PDF file | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Template | |
path: template.pdf | |
- name: Push changes to the repository | |
run: | | |
version=$(grep novathesisversion $VERSION_FILE | cut -d "{" -f3 | cut -d "}" -f1) | |
git config --global user.email "$EMAIL_GITHUB" | |
git config --global user.name "$USERNAME_GITHUB" | |
git add -f template.pdf | |
git commit -m "Version $(grep novathesisversion $VERSION_FILE | cut -d '{' -f3 | cut -d '}' -f1)" | |
git push |