52 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			52 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
| name: Render LaTeX and Publish Release
 | |
| 
 | |
| on:
 | |
|   push:
 | |
|     tags:
 | |
|       - '*'
 | |
| 
 | |
| jobs:
 | |
|   build:
 | |
|     runs-on: ubuntu-latest
 | |
|     permissions: 
 | |
|       contents: write
 | |
| 
 | |
|     steps:
 | |
|     - name: Checkout repository
 | |
|       uses: actions/checkout@v3
 | |
| 
 | |
|     - name: Install LaTeX
 | |
|       run: |
 | |
|         sudo apt-get update
 | |
|         sudo apt-get install -y texlive-latex-base texlive-science texlive-latex-extra texlive-fonts-recommended latexmk        
 | |
| 
 | |
|     - name: Render LaTeX document
 | |
|       run: latexmk -pdflua report.tex
 | |
| 
 | |
|     - name: Get current date
 | |
|       id: date
 | |
|       run: echo "::set-output name=date::$(date +'%Y-%m-%d-%H%M%S')"
 | |
| 
 | |
|     - name: release
 | |
|       uses: actions/create-release@v1
 | |
|       id: create_release
 | |
|       with:
 | |
|         draft: false
 | |
|         prerelease: false
 | |
|         # Ref will be tag in this context
 | |
|         release_name: ${{ github.ref }} 
 | |
|         tag_name: ${{ github.ref }}
 | |
|       env:
 | |
|         GITHUB_TOKEN: ${{ github.token }}
 | |
|   
 | |
|     - name: Upload assembled CV
 | |
|       uses: actions/upload-release-asset@v1
 | |
|       env:
 | |
|         GITHUB_TOKEN: ${{ github.token }}
 | |
|       with:
 | |
|         upload_url: ${{ steps.create_release.outputs.upload_url }}
 | |
|         asset_path: ./cv.pdf
 | |
|         asset_name: cv.pdf
 | |
|         asset_content_type: application/pdf
 | |
| 
 |