From b7b2f0ec55f31b5bcd4ab30ee73a8db7dbba2bb9 Mon Sep 17 00:00:00 2001 From: Jacopo Moretti Date: Sun, 10 May 2026 21:38:20 +0200 Subject: [PATCH] feat: first workflow test --- .github/workflows/typst.yml | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/typst.yml diff --git a/.github/workflows/typst.yml b/.github/workflows/typst.yml new file mode 100644 index 0000000..ba2a4ce --- /dev/null +++ b/.github/workflows/typst.yml @@ -0,0 +1,38 @@ +name: Build Typst document +on: pull_request +jobs: + build_typst_documents: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Typst + uses: lvignoli/typst-action@main + with: + source_file: doc/main.typ + options: | + --root + doc + - name: Get current date + id: date + run: echo "DATE=$(date +%Y-%m-%d-%H:%M | tr ':' '_')" >> $GITHUB_ENV + - name: Add date to PDF + run: | + for file in **/*.pdf; do + cp "$file" "${file%.pdf}-${{ env.DATE }}.pdf" + done + - name: Upload PDF file + uses: actions/upload-artifact@v4 + with: + name: PDF-${{ env.DATE }} + path: "**/*.pdf" + - name: Create Release + uses: ncipollo/release-action@v1 + with: + artifacts: "doc/main.pdf" + body: "PDF generated from main.typ" + commit: "main" + tag: "latest" + allowUpdates: true \ No newline at end of file