[TASK] More restructurings #11
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 and Publish current Resume | |
on: | |
push: | |
branches: | |
- 'main' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout current Resume | |
uses: actions/checkout@v4 | |
- name: Compile Resume | |
uses: antaljanosbenjamin/[email protected] | |
with: | |
file: mai-joel_maximilian-curriculum_vitae.tex | |
output-directory: downloads/ | |
args: -pdf | |
- name: Test if Resume build was successful | |
run: '(test -f downloads/mai-joel_maximilian-curriculum_vitae.pdf && echo PDF exists) || (echo PDF does not exist && exit 1)' | |
- name: Get the current date and time | |
id: date | |
run: echo "::set-output name=timestamp::$(date +'%Y-%m-%d-%H-%M')" | |
- name: Generate Release Tag | |
id: generate_tag | |
run: echo "::set-output name=tag::v${{ steps.date.outputs.timestamp }}" | |
- name: Create Release | |
id: create_release | |
uses: actions/[email protected] | |
with: | |
files: | | |
downloads/mai-joel_maximilian-curriculum_vitae.pdf | |
tag_name: ${{ steps.generate_tag.outputs.tag }} | |
release_name: Release ${{ steps.generate_tag.outputs.tag }} | |
draft: false | |
prerelease: false | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload Resume Asset to Release | |
id: upload_release_asset | |
uses: actions/upload-release-asset@v1 | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: downloads/mai-joel_maximilian-curriculum_vitae.pdf | |
asset_name: mai-joel_maximilian-curriculum_vitae.pdf | |
asset_content_type: application/pdf | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |