Skip to content

Release

Release #14

Workflow file for this run

name: Release
on:
push:
tags:
- "*"
env:
typst_cv: modernpro-cv
typst_legacy: modernpro-cv-legacy
jobs:
build:
name: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: List template directory contents
run: ls -l ./template/
- name: List legacy directory contents
run: ls -l ./legacy/
- name: Zip
id: zip
run: |
mkdir ${{ env.typst_cv }}
cp ./template/cv-single.typ ./template/cv-double.typ ./modernpro-cv.typ ${{ env.typst_cv }}
zip -r ${{ env.typst_cv }}.zip ./${{ env.typst_cv }}
mkdir ${{ env.typst_legacy }}
cp ./legacy/modernpro-cv-legacy.typ ./legacy/example-single-legacy.typ ./legacy/example-double-legacy.typ ./legacy/coverletter-legacy.typ ${{ env.typst_legacy }}
zip -r ${{ env.typst_legacy }}.zip ./${{ env.typst_legacy }}
echo "tag_name=$(git tag --sort version:refname | tail -n 1)" >> "$GITHUB_ENV"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
VERSION: ${{ github.ref }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false
- name: Upload CV zip
id: upload-cv-zip
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./${{ env.typst_cv }}.zip
asset_name: ${{ env.typst_cv }}-${{ github.ref_name }}.zip
asset_content_type: application/zip
- name: Upload legacy zip
id: upload-cl-zip
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./${{ env.typst_legacy }}.zip
asset_name: ${{ env.typst_legacy }}-${{ github.ref_name }}.zip
asset_content_type: application/zip
- name: Upload CV Single
id: upload-cv-single
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./template/cv-single.typ
asset_name: cv-single.typ
asset_content_type: text/typst
- name: Upload CV Double
id: upload-cv-double
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./template/cv-double.typ
asset_name: cv-double.typ
asset_content_type: text/typst
- name: Upload Typst setup
id: upload-typst-setup
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./modernpro-cv.typ
asset_name: modernpro-cv.typ
asset_content_type: text/typst