From 1b3f3500ff024bed13f03b2e250f1c116a947cb1 Mon Sep 17 00:00:00 2001 From: Kristofers Solo Date: Tue, 9 Jan 2024 18:19:53 +0200 Subject: [PATCH] chore(gh-actions): add typst build fix: add on pull_request --- .github/workflows/typst.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 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..5c4a6b2 --- /dev/null +++ b/.github/workflows/typst.yml @@ -0,0 +1,33 @@ +name: Build Typst document +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] +permissions: + contents: write +jobs: + typst-build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Typst + uses: lvignoli/typst-action@main + with: + source_file: | + typst/main.typ + - name: Uplaoding PDF file + uses: actions/upload-artifact@v3 + with: + name: PDF + path: | + typst/main.pdf + - name: Get current date + id: date + run: echo "DATE=$(date +%Y-%m-%d-%H:%M)" >> $GITHUB_ENV + - name: Release + uses: softprops/action-gh-release@v1 + if: github.ref_type == 'tag' + with: + name: "${{ github.ref_name }} — ${{ env.DATE }}" + files: typst/main.pdf