-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit e955ae3
Showing
42 changed files
with
10,554 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Check compilation on push | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Compile LaTeX document | ||
uses: xu-cheng/latex-action@v2 | ||
with: | ||
root_file: main.tex | ||
latexmk_shell_escape: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Release PDF on tag | ||
|
||
on: | ||
push: | ||
tags: | ||
- "[0-9]+.[0-9]+.[0-9]+" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Set up Git repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Get repository basename | ||
id: get_repo_name | ||
run: echo "repo_name=$(basename $GITHUB_REPOSITORY)" > $GITHUB_OUTPUT | ||
|
||
- name: Get tag basename | ||
id: get_tag_name | ||
run: echo "tag_name=$(basename $GITHUB_REF)" > $GITHUB_OUTPUT | ||
|
||
# Questo serve nel caso in cui si usi in input il commit_hash.part per identificare le versioni | ||
- name: Create commit hash file | ||
run: git show -s --format=%H > commit_hash.part | ||
|
||
- name: Compile LaTeX document | ||
uses: xu-cheng/latex-action@v2 | ||
with: | ||
root_file: main.tex | ||
latexmk_shell_escape: true | ||
|
||
# Questo elimina il commit_hash.part | ||
- name: Remove commit hash file | ||
run: rm -f commit_hash.part | ||
|
||
- name: Create release | ||
id: create_release | ||
uses: ncipollo/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Upload PDF artifact | ||
id: upload-release-asset | ||
uses: tanyagray/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./main.pdf | ||
asset_name: ${{ github.repository }}-${{ steps.get_tag_name.outputs.tag_name }}.pdf | ||
asset_content_type: pdf |
Oops, something went wrong.