Vendor Typst compiler locally instead of depending on typstdrive folder

This commit is contained in:
2026-07-22 16:34:31 -04:00
parent 30bfa0d7a8
commit 65b041b6c9
5 changed files with 26 additions and 23 deletions
+9 -9
View File
@@ -23,8 +23,8 @@ jobs:
- name: Clone Typst compiler
run: |
git clone https://github.com/typst/typst.git typstdrive/typst
git -C typstdrive/typst checkout "$TYPST_COMMIT"
git clone https://github.com/typst/typst.git typst-desktop/typst
git -C typst-desktop/typst checkout "$TYPST_COMMIT"
- name: Install build dependencies
run: |
@@ -85,17 +85,18 @@ jobs:
path: packages/*
if-no-files-found: error
- name: Publish to GitHub release
- name: Publish to Gitea release
if: startsWith(github.ref, 'refs/tags/v')
env:
TOKEN: ${{ secrets.RELEASE_TOKEN }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITEA_URL: https://git.sirblob.co
REPOSITORY: sirblobby/typst-desktop
TAG: ${{ github.ref_name }}
run: |
set -euo pipefail
api="https://api.github.com/repos/$REPOSITORY"
auth="Authorization: Bearer $TOKEN"
api="$GITEA_URL/api/v1/repos/$REPOSITORY"
auth="Authorization: token $TOKEN"
json="Content-Type: application/json"
existing=$(curl -sS -H "$auth" "$api/releases/tags/$TAG" | jq -r '.id // empty')
@@ -118,9 +119,8 @@ jobs:
name=$(basename "$package")
echo "Uploading $name"
curl -sS --fail -X POST -H "$auth" \
-H "Content-Type: application/octet-stream" \
--data-binary "@$package" \
"https://uploads.github.com/repos/$REPOSITORY/releases/$release_id/assets?name=$name" \
-F "attachment=@$package" \
"$api/releases/$release_id/assets?name=$name" \
> /dev/null
done