Skip to content

Update create-release.yaml #15

Update create-release.yaml

Update create-release.yaml #15

on:
push:
branches: ['main']
workflow_dispatch:
jobs:
createRelease:
name: Create release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install TeXlive
run: sudo apt-get update && sudo apt-get install texlive texlive-publishers texlive-science latexmk cm-super
- name: LaTeX compile
working-directory: rsc
run: pdflatex --shell-escape useful-templates-tikz-main
- run: ls
- name: Set tag name
id: tag
run: |
tag=v$(date +%Y%m%d.%H%M%S)
echo "tag=$tag" >> $GITHUB_OUTPUT
- name: Prepare release
id: prepare
run: |
tag="${{ steps.tag.outputs.tag }}"
zip_file="outputs/template-$tag.zip"
mkdir outputs
zip -r $zip_file rsc/ delft-hyperloop.cls main.tex
echo "zip_file=$zip_file" >> $GITHUB_OUTPUT
- name: Create release
run: |
tag="${{ steps.tag.outputs.tag }}"
body="Version at $(date +%Y%m%d.%H%M%S)"
zip_file="${{ steps.prepare.outputs.zip_file }}"
gh release create "$tag" --title "$tag" --notes "$body" "$zip_file#Template"
env:
GH_TOKEN: ${{ github.token }}