From b0fc412b575b2a28d61c660cd879eebc6a5a93ec Mon Sep 17 00:00:00 2001 From: servostar Date: Mon, 25 Nov 2024 10:01:24 +0000 Subject: [PATCH] ci/fix-release-artifacts (#93) Release-As: v0.5.3 Reviewed-on: https://git.montehaselino.de/DHBW/dhbw-abb-typst-template/pulls/93 Co-authored-by: servostar Co-committed-by: servostar --- .gitea/workflows/ci.yml | 11 ++--- .gitea/workflows/release.yml | 4 +- shell.nix | 1 + src/glossarium.typ | 81 +++++++++++++++++++----------------- 4 files changed, 51 insertions(+), 46 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index bc4eec0..3a04e93 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -1,10 +1,12 @@ name: Build'n check run-name: Performing Typst compilation on: - push: pull_request: - branches: - - main + types: + - opened + - synchronize + branches: + - main jobs: run-ci-linux: runs-on: ubuntu-latest @@ -12,8 +14,7 @@ jobs: # push with commit containing "Run-Checks" if: > (contains(github.event.head_commit.message, 'Run-Checks') && - github.event_name == 'push') || - github.event_name == 'pull_request' + github.event_name == 'push') steps: - name: Check out repository code uses: actions/checkout@v3 diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 259d3b1..18156b2 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -28,7 +28,7 @@ jobs: nix-shell --run ./run-ci.sh - name: Upload artifact id: artifact-upload - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: example-document path: ${{ github.workspace }}/example.pdf @@ -51,7 +51,7 @@ jobs: go-version: '>=1.20.1' - name: Download Artifact id: download - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v3 with: name: example-document path: ${{ github.workspace }}/Example.pdf diff --git a/shell.nix b/shell.nix index e3ea31b..12fabe3 100644 --- a/shell.nix +++ b/shell.nix @@ -9,5 +9,6 @@ pkgs.mkShellNoCC { python312Packages.pyyaml typst typstyle + ripgrep ]; } diff --git a/src/glossarium.typ b/src/glossarium.typ index 2da8c9d..9db2172 100644 --- a/src/glossarium.typ +++ b/src/glossarium.typ @@ -200,46 +200,49 @@ SOFTWARE.*/ #block( below: 1.5em, width: 100%, - par(hanging-indent: 1em, align(left)[ - #text(weight: "bold", entry.short) - #if hasLong and hasDesc [ - (#text(entry.long)) - ] else if hasLong { - text(entry.long) - } - #if hasDesc [ #sym.dash.en ] - #if hasDesc [ #desc ] - #if disable-back-references != true { - term_references - .map(x => x.location()) - .sorted(key: x => x.page()) - .fold( - (values: (), pages: ()), - ((values, pages), x) => if pages.contains( - x.page(), - ) { - (values: values, pages: pages) - } else { - values.push(x) - pages.push(x.page()) - (values: values, pages: pages) - }, - ) - .values - .map(x => { - let page-numbering = x.page-numbering() - if page-numbering == none { - page-numbering = "1" + par( + hanging-indent: 1em, + align(left)[ + #text(weight: "bold", entry.short) + #if hasLong and hasDesc [ + (#text(entry.long)) + ] else if hasLong { + text(entry.long) + } + #if hasDesc [ #sym.dash.en ] + #if hasDesc [ #desc ] + #if disable-back-references != true { + term_references + .map(x => x.location()) + .sorted(key: x => x.page()) + .fold( + (values: (), pages: ()), + ((values, pages), x) => if pages.contains( + x.page(), + ) { + (values: values, pages: pages) + } else { + values.push(x) + pages.push(x.page()) + (values: values, pages: pages) + }, + ) + .values + .map(x => { + let page-numbering = x.page-numbering() + if page-numbering == none { + page-numbering = "1" + } + link(x)[#numbering( + page-numbering, + ..counter(page).at(x), + )] } - link(x)[#numbering( - page-numbering, - ..counter(page).at(x), - )] - } - ) - .join(", ") - } - ]), + ) + .join(", ") + } + ], + ), ) ] }