Skip to content

Update typst to 0.10.0 #38

Update typst to 0.10.0

Update typst to 0.10.0 #38

on:
push:
branches:
- main
tags:
- "v*.*.*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
uses: awalsh128/[email protected]
with:
packages: wget xz-utils make imagemagick ghostscript unzip fontconfig
- name: Install typst
run: |
wget https://github.com/typst/typst/releases/download/v0.10.0/typst-x86_64-unknown-linux-musl.tar.xz
tar xvf typst-x86_64-unknown-linux-musl.tar.xz
echo typst-x86_64-unknown-linux-musl >> $GITHUB_PATH
- name: Install fonts
run: |
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.2/ProFont.zip
unzip -d ~/.fonts ProFont.zip
wget https://webonastick.com/fonts/routed-gothic/download/routed-gothic-ttf.zip
unzip -d ~/.fonts routed-gothic-ttf.zip
fc-cache -fv
- name: Fix ImageMagic security policy
run: sudo rm /etc/ImageMagick-6/policy.xml
- name: Stamp files with release version
if: startsWith(github.ref, 'refs/tags/')
run: sed -i -e "s/unreleased/$GITHUB_REF_NAME/" include/a5x-template.typ
- name: Build
env:
TYPST_FONT_PATHS: /home/runner/.fonts
run: |
typst fonts
make
- name: Upload built templates to artifact store
uses: actions/upload-artifact@v3
with:
name: templates
path: |
*.png
release:
if: startsWith(github.ref, 'refs/tags/')
needs:
- build
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: templates
- name: Create bundle
run: zip supernote-templates-bundle-${GITHUB_REF_NAME}.zip -xi *.png
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
*.png
*.zip