Merge pull request #3 from planetnix/update-actions #11
This file contains 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: Build Typst document | |
on: [push, workflow_dispatch] | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup typst | |
uses: typst-community/setup-typst@v3 | |
- name: Build PDF | |
run: typst compile posters.typ --font-path . posters.pdf | |
- name: Build PNG Previews | |
run: | | |
mkdir thumbnails | |
typst compile posters.typ --font-path . thumbnails/posters-{0p}.png | |
zip posters.zip thumbnails/*.png | |
- name: Upload PDF file | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Poster PDF File | |
path: "*.pdf" | |
- name: Upload PNG Thumbs | |
uses: actions/upload-artifact@v4 | |
with: | |
name: PNG Thumbs | |
path: "posters.zip" | |
- name: Get current date | |
id: date | |
run: echo "DATE=$(date +%Y-%m-%d-%H:%M)" >> $GITHUB_ENV | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
if: github.ref_type == 'tag' | |
with: | |
name: "${{ github.ref_name }} — ${{ env.DATE }}" | |
files: posters.pdf |