aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/release.yml
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-09-01 14:48:45 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-09-01 14:48:45 +0300
commit8a6d697308162874a236c84aac0b0f8c7ac01f83 (patch)
treeed7dc7e8c6f50d66bde721fae78576aede929f66 /.github/workflows/release.yml
parentb54a78aa510b87d1e3b56c619b72eaeb59e4a2a1 (diff)
refactor: separate website presentation from runtime
Diffstat (limited to '.github/workflows/release.yml')
-rw-r--r--.github/workflows/release.yml46
1 files changed, 17 insertions, 29 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index a7cc3558..3b835c7a 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -191,6 +191,7 @@ jobs:
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
+ fetch-depth: 0
persist-credentials: false
- name: Install Bun
@@ -201,9 +202,13 @@ jobs:
- name: Validate release inputs
run: |
python3 scripts/changelog.py validate-product-announcement
+ python3 scripts/agent_detection_manifest_check.py --require-all-published
+ python3 scripts/config_reference_check.py
+ node scripts/docs/versions.mjs check
+ node scripts/docs/preview.mjs check
+ bun test scripts/docs/*.test.ts
test -f docs/next/README.md
test -f docs/next/README.zh-CN.md
- (cd website && bun install --frozen-lockfile && bun run test && bun run build:draft)
release:
needs: [build, flake-check, validate-release-inputs]
@@ -388,17 +393,12 @@ jobs:
fetch-depth: 0
ssh-key: ${{ secrets.RELEASE_DEPLOY_KEY }}
- - name: Install Bun
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
- with:
- bun-version: 1.3.14
-
- - name: Publish tagged documentation and update website manifest
+ - name: Publish tagged documentation and update distribution manifest
env:
GH_TOKEN: ${{ github.token }}
run: |
VERSION="${GITHUB_REF_NAME#v}"
- node website/scripts/docs-versions.mjs publish "$GITHUB_REF_NAME"
+ node scripts/docs/versions.mjs publish "$GITHUB_REF_NAME"
ANNOUNCEMENT_PATH="$RUNNER_TEMP/product-announcement.json"
ANNOUNCEMENT_ORIGINAL_PATH="$RUNNER_TEMP/product-announcement-original.json"
git show "${GITHUB_REF_NAME}:docs/next/product-announcement.json" > "$ANNOUNCEMENT_PATH"
@@ -406,35 +406,34 @@ jobs:
python3 scripts/changelog.py validate-product-announcement --path "$ANNOUNCEMENT_PATH"
RELEASE_PROTOCOL=$(git show "${GITHUB_REF_NAME}:src/protocol/wire.rs" | python3 -c 'import re, sys; match = re.search(r"pub const PROTOCOL_VERSION: u32 = (\d+);", sys.stdin.read()); sys.exit(1) if match is None else print(match.group(1))')
- DOCS_CURRENT=$(node website/scripts/docs-versions.mjs current)
+ DOCS_CURRENT=$(node scripts/docs/versions.mjs current)
if [ "$DOCS_CURRENT" != "$VERSION" ]; then
echo "Archived v$VERSION documentation without moving current docs backward from v$DOCS_CURRENT"
exit 0
fi
- CURRENT_VERSION=$(python3 -c 'import json; print(json.load(open("website/latest.json")).get("version", ""))')
+ CURRENT_VERSION=$(python3 -c 'import json; print(json.load(open("distribution/latest.json")).get("version", ""))')
if [ "$CURRENT_VERSION" = "$VERSION" ]; then
- echo "website/latest.json is already at v$VERSION"
+ echo "distribution/latest.json is already at v$VERSION"
exit 0
fi
- python3 scripts/changelog.py sync-latest-json --version "$VERSION" --output website/latest.json --announcement "$ANNOUNCEMENT_PATH" --protocol "$RELEASE_PROTOCOL"
+ python3 scripts/changelog.py sync-latest-json --version "$VERSION" --output distribution/latest.json --announcement "$ANNOUNCEMENT_PATH" --protocol "$RELEASE_PROTOCOL"
if cmp -s "$ANNOUNCEMENT_ORIGINAL_PATH" docs/next/product-announcement.json; then
printf 'null\n' > docs/next/product-announcement.json
else
echo "::warning::docs/next/product-announcement.json changed after $GITHUB_REF_NAME; leaving it unchanged."
fi
- - name: Commit website latest manifest
+ - name: Commit release distribution
run: |
VERSION="${GITHUB_REF_NAME#v}"
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- git add -A README.md README.zh-CN.md docs/versions website/latest.json docs/next/product-announcement.json
- git diff --cached --quiet || git commit -m "docs: update website manifest for v$VERSION"
+ git add -A README.md README.zh-CN.md docs/versions distribution/latest.json docs/next/product-announcement.json
+ git diff --cached --quiet || git commit -m "docs: publish release distribution for v$VERSION"
for attempt in 1 2 3; do
git pull --rebase origin master
- node website/scripts/docs-versions.mjs check
- node website/scripts/docs-preview.mjs check
- (cd website && bun install --frozen-lockfile && bun run build)
+ node scripts/docs/versions.mjs check
+ node scripts/docs/preview.mjs check
if git push origin master; then
exit 0
fi
@@ -445,14 +444,3 @@ jobs:
done
echo "failed to publish release documentation after 3 attempts" >&2
exit 1
-
- - name: Trigger website deploy
- env:
- DEPLOY_HOOK: ${{ secrets.CLOUDFLARE_PAGES_DEPLOY_HOOK }}
- run: |
- if [ -z "$DEPLOY_HOOK" ]; then
- echo "CLOUDFLARE_PAGES_DEPLOY_HOOK not set; relying on Cloudflare git auto-deploy"
- exit 0
- fi
- curl -fsS -X POST "$DEPLOY_HOOK" > /dev/null
- echo "Triggered Cloudflare Pages production deploy"