Update test.yml #3
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test | |
| on: [ push, pull_request ] | |
| jobs: | |
| compile: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: yusancky/setup-typst@v2 | |
| with: | |
| version: latest | |
| - uses: actions/checkout@v3 | |
| - name: Extract version | |
| id: toml | |
| run: | | |
| VERSION=$(awk -F'= *' '/^version/{gsub(/"/,"",$2);print $2}' typst.toml) | |
| echo "VERSION=$VERSION" >> "$GITHUB_ENV" | |
| - name: Link local template package | |
| run: | | |
| mkdir -p ~/.local/share/typst/packages/preview/accelerated-jacow | |
| ln -s $(pwd) ~/.local/share/typst/packages/preview/accelerated-jacow/$VERSION | |
| - name: Init & compile | |
| run: | | |
| mkdir test | |
| cd test | |
| typst init @preview/accelerated-jacow:$VERSION | |
| cd accelerated-jacow | |
| ls -l | |
| typst compile *.typ | |
| - uses: actions/upload-artifact@v3 | |
| with: | |
| name: PDF | |
| path: '*.pdf' |