Skip to content

Commit

Permalink
Create main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
dibyadip-das authored Mar 29, 2021
1 parent f4d9548 commit 281689b
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build and Release LaTeX document
on:
push:
workflow_dispatch:

jobs:
release-latex:
name: Releases CV
runs-on: ubuntu-latest
needs: build_latex
steps:
- name: Download CV
uses: actions/download-artifact@v2
with:
name: cv_dibyadip_das.zip
- name: Create New Release
id: create_new_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.run_number }}
release_name: Release ${{ github.run_number }}
- name: Upload artifact to GitHub Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_new_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./cv_dibyadip_das.pdf
asset_name: cv_dibyadip_das.pdf
asset_content_type: application/pdf

build_latex:
name: Build LaTeX
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v2
- name: Compile LaTeX document
uses: xu-cheng/latex-action@v2
with:
root_file: cv_dibyadip_das.tex
- name: Upload CV
uses: actions/upload-artifact@v2
with:
name: cv_dibyadip_das.zip
path: cv_dibyadip_das.pdf

0 comments on commit 281689b

Please sign in to comment.