update #17
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 LaTeX document | |
on: [push] | |
jobs: | |
build_latex: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./cv | |
steps: | |
- name: Set up Git repository | |
uses: actions/checkout@v2 | |
- name: Compile LaTeX document | |
uses: xu-cheng/latex-action@v2 | |
with: | |
root_file: cv.tex | |
- name: Get current date | |
id: date | |
run: echo "::set-output name=date::$(date +'%Y-%m-%d')" | |
- name: Rename pdf for release | |
run: mv cv.pdf cv_aaron_murniadi_v${{ github.run_number }}_${{ steps.date.outputs.date }}.pdf | |
- name: Upload PDF as artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: aaron_murniadi_cv_v${{ github.run_number }}_${{ steps.date.outputs.date }}.pdf | |
path: aaron_murniadi_cv_v${{ github.run_number }}_${{ steps.date.outputs.date }}.pdf | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: v${{ github.run_number }} | |
release_name: aaron_murniadi_cv_v${{ github.run_number }}_${{ steps.date.outputs.date }}.pdf | |
draft: false | |
prerelease: false | |
- 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: aaron_murniadi_cv_v${{ github.run_number }}_${{ steps.date.outputs.date }}.pdf | |
asset_name: aaron_murniadi_cv_v${{ github.run_number }}_${{ steps.date.outputs.date }}.pdf | |
asset_content_type: application/pdf |