From f33f612f438f099cbf2486c656ca2facb8461faa Mon Sep 17 00:00:00 2001 From: ParaN3xus <136563585+ParaN3xus@users.noreply.github.com> Date: Tue, 5 Aug 2025 10:27:44 +0800 Subject: [PATCH] feat: maintain workflows for nightly releases (#1986) --- .github/workflows/auto-tag.yml | 1 + .github/workflows/release-nightly.yml | 33 +++++++++++++++------------ 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/.github/workflows/auto-tag.yml b/.github/workflows/auto-tag.yml index 43bbe11a3..6a3393d98 100644 --- a/.github/workflows/auto-tag.yml +++ b/.github/workflows/auto-tag.yml @@ -13,6 +13,7 @@ jobs: - name: Checkout code uses: actions/checkout@v4 with: + token: ${{ secrets.REPO_TOKEN }} fetch-depth: 0 - name: Get merged PR info diff --git a/.github/workflows/release-nightly.yml b/.github/workflows/release-nightly.yml index 246ca29ec..eb2d11102 100644 --- a/.github/workflows/release-nightly.yml +++ b/.github/workflows/release-nightly.yml @@ -25,7 +25,7 @@ jobs: uses: actions/checkout@v4 with: ref: nightly - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.REPO_TOKEN }} fetch-depth: 0 - name: Install Node.js @@ -41,11 +41,6 @@ jobs: git config --global user.name "github-actions[bot]" git config --global user.email "github-actions[bot]@users.noreply.github.com" - - name: Install system dependencies - run: | - sudo apt-get update - sudo apt-get install -y jq --no-install-recommends - - name: Determine release type id: release_type run: | @@ -68,7 +63,8 @@ jobs: eval "$(node $GITHUB_WORKSPACE/scripts/nightly-utils.mjs . get-current-revs)" # Get latest revs - latest_typst_rev=$(curl -s "https://api.github.com/repos/ParaN3xus/typst/commits/nightly-content-hint" | jq -r '.sha') + latest_typst_rev=$(curl -s "https://api.github.com/repos/ParaN3xus/typst/commits/nightly" | jq -r '.sha') + latest_typst_content_hint_rev=$(curl -s "https://api.github.com/repos/ParaN3xus/typst/commits/nightly-content-hint" | jq -r '.sha') latest_reflexo_rev=$(curl -s "https://api.github.com/repos/ParaN3xus/typst.ts/commits/nightly" | jq -r '.sha') latest_typstyle_rev=$(curl -s "https://api.github.com/repos/ParaN3xus/typstyle/commits/nightly" | jq -r '.sha') latest_typst_ansi_hl_rev=$(curl -s "https://api.github.com/repos/ParaN3xus/typst-ansi-hl/commits/nightly" | jq -r '.sha') @@ -124,6 +120,7 @@ jobs: echo "need_release=$need_release" >> $GITHUB_OUTPUT echo "latest_typst_rev=$latest_typst_rev" >> $GITHUB_ENV + echo "latest_typst_content_hint_rev=$latest_typst_content_hint_rev" >> $GITHUB_ENV - name: Calculate new version id: version @@ -138,6 +135,7 @@ jobs: echo "new_version=$new_version" >> $GITHUB_ENV - uses: actions-rust-lang/setup-rust-toolchain@v1 + if: steps.check_updates.outputs.need_release == 'true' - name: Get typst information id: typst_info @@ -179,10 +177,10 @@ jobs: ) node $GITHUB_WORKSPACE/scripts/nightly-utils.mjs . update-patch-revs "$revs_json" - - name: Update world crates version + - name: Bump world crates version if: steps.check_updates.outputs.need_release == 'true' run: | - node $GITHUB_WORKSPACE/scripts/nightly-utils.mjs . bump-world-crates "$new_version" + # node $GITHUB_WORKSPACE/scripts/nightly-utils.mjs . bump-world-crates "$new_version" cargo update git add -A @@ -202,7 +200,7 @@ jobs: new_version="$new_version" - node $GITHUB_WORKSPACE/scripts/nightly-utils.mjs . update-world-crates "$new_version" + # node $GITHUB_WORKSPACE/scripts/nightly-utils.mjs . update-world-crates "$new_version" # Update typst dependencies node $GITHUB_WORKSPACE/scripts/nightly-utils.mjs . update-typst-deps \ @@ -213,7 +211,7 @@ jobs: revs_json=$(cat <