Skip to content

Commit

Permalink
Testing github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
guruor committed Jul 24, 2024
1 parent 0009d97 commit a52d6f0
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: release

on:
push:
branches: [main]

env:
RESUME_TARGET: release/resume.pdf

jobs:
publish:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "22.5.1"

- name: Install requirements
run: npm ci

- name: Rendering html
run: npm run to_html

- name: Rendering pdf
run: npm run to_pdf

- name: Set version as short sha
run: echo "VERSION=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV

- name: Get asset name
run: echo "RESUME_NAME=`basename ${RESUME_TARGET}`" >> $GITHUB_ENV

- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.VERSION }}
release_name: Release ${{ env.VERSION }}
draft: false
prerelease: false

- name: Upload pdf
id: upload-release-pdf
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ env.RESUME_TARGET }}
asset_name: ${{ env.RESUME_NAME }}
asset_content_type: application/pdf

0 comments on commit a52d6f0

Please sign in to comment.