Skip to content

Commit

Permalink
ci: add workflow to create release
Browse files Browse the repository at this point in the history
  • Loading branch information
rohit-gohri committed May 3, 2020
1 parent 07cb696 commit 8dcdeab
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Release

on:
push:
tags:
- 'v*'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- name: Generate PDF
uses: xu-cheng/latex-action@master
with:
root_file: |
resume.tex
args: |
-pdf -interaction=nonstopmode -halt-on-error -jobname=Preview
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
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: ./Preview.pdf
asset_name: Preview.pdf
asset_content_type: application/pdf

0 comments on commit 8dcdeab

Please sign in to comment.