mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-08-30 04:40:37 +00:00
Address ds-review-bot findings on PR #2798: - release-publish.yml: use pnpm run build:official (not build) so the dsh pack step's verifyBuildArtifacts (families.ts:327, readClientBuildRecord with officialClientBuildEnvironment) finds the official client-build record; build would fail Pack release tarballs on a clean runner. - issue-lifecycle.yml: move the previous job-level if to step level on Create project token and Handle repository event, so approved/commented reviews pass (job reported success, no gray segment) without minting a write-capable App token or touching the board — preserving the original least-privilege property. - ci-workflow.spec.ts: lock the step-level gate on the two lifecycle steps, and add a release-workflow invariant test (release.yml/vendor are pack-only; release-publish.yml/vendor-publish.yml are workflow_dispatch-only with the npm-publish environment and Release-publish group) to prevent #2797 recurrence. - Update 2026-08-10-event-directed-pr-review-status and 2026-08-10-npm-release- sequences notes (en/zh/i18n) to the new split and step-level behavior. Verification: ci-workflow.spec.ts 14/14, typecheck clean, all five workflows YAML-parse, verify-translation-pairing consistent, note-format 582.
132 lines
4.5 KiB
YAML
132 lines
4.5 KiB
YAML
# Publish the dsh release sequence to npm. This workflow is manual-only
|
|
# (workflow_dispatch) and intentionally does not listen to pull_request or push:
|
|
# publication must always be an explicit, reviewed act from a dsh-v* tag, and it
|
|
# must never appear as a PR check. It repacks the current tree before publishing
|
|
# so the bytes uploaded are exactly what this dispatch produced.
|
|
name: Release publish (dsh)
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
env:
|
|
PRIMARY_NODE_VERSION: '24'
|
|
DSH_TELEMETRY_DISABLED: '1'
|
|
|
|
jobs:
|
|
pack:
|
|
name: Pack npm tarballs
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
# Complete history: the release scripts read tags.
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
persist-credentials: false
|
|
|
|
- uses: pnpm/action-setup@v4
|
|
with:
|
|
dest: ${{ runner.temp }}/setup-pnpm
|
|
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version: ${{ env.PRIMARY_NODE_VERSION }}
|
|
|
|
- name: Configure pnpm store path
|
|
id: pnpm-store
|
|
run: |
|
|
store_root="$HOME/.local/share/pnpm/store"
|
|
echo "PNPM_CONFIG_STORE_DIR=$store_root" >> "$GITHUB_ENV"
|
|
store_path=$(PNPM_CONFIG_STORE_DIR="$store_root" pnpm store path --silent)
|
|
echo "path=$store_path" >> "$GITHUB_OUTPUT"
|
|
|
|
- uses: actions/cache/restore@v4
|
|
with:
|
|
path: ${{ steps.pnpm-store.outputs.path }}
|
|
key: ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-
|
|
|
|
- name: Install (immutable)
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Verify release version
|
|
env:
|
|
RELEASE_PUBLISH: 'true'
|
|
run: pnpm run release:verify --family dsh
|
|
|
|
- name: Build
|
|
run: pnpm run build:official
|
|
|
|
- name: Pack release tarballs
|
|
run: pnpm run release:pack --family dsh --out dist/npm
|
|
|
|
# The harness packages declare the vendored framework as a peer, and this
|
|
# verification must not depend on the registry already carrying matching
|
|
# versions — one pull request may bump both families before either
|
|
# publishes — so it installs that family's pack output too. Only dist/npm
|
|
# is published.
|
|
- name: Pack the vendored framework for verification
|
|
run: pnpm run release:pack --family vendor --out dist/npm-vendor
|
|
|
|
# dsh-sandbox-local declares the Landlock entry as a runtime dependency, so
|
|
# the verification needs its tarball. Its platform packages stay out: they
|
|
# are optional, and building them needs a musl toolchain per architecture.
|
|
- name: Pack the Landlock entry for verification
|
|
run: |
|
|
pnpm --dir native/landlock-run run build:ts
|
|
pnpm --dir native/landlock-run/packages/entry pack --pack-destination "$PWD/dist/npm-landlock"
|
|
|
|
- name: Verify packed install
|
|
run: pnpm run release:verify-packed-install --family dsh --from dist/npm --from dist/npm-vendor --from dist/npm-landlock
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: dsh-npm-tarballs
|
|
path: dist/npm/*
|
|
if-no-files-found: error
|
|
retention-days: 7
|
|
|
|
publish:
|
|
name: Publish to npm
|
|
needs: pack
|
|
runs-on: ubuntu-24.04
|
|
# Required reviewers and the allowed tags live on the environment; this is
|
|
# the only job in the sequence that can write to the registry.
|
|
environment: npm-publish
|
|
concurrency:
|
|
group: Release-publish
|
|
cancel-in-progress: false
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
# Checkout and install carry the release scripts only. There is no build
|
|
# step: publication uploads the bytes the pack job produced.
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- uses: pnpm/action-setup@v4
|
|
with:
|
|
dest: ${{ runner.temp }}/setup-pnpm
|
|
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version: ${{ env.PRIMARY_NODE_VERSION }}
|
|
registry-url: https://registry.npmjs.org
|
|
|
|
- name: Install (immutable, no package scripts)
|
|
run: pnpm install --frozen-lockfile --ignore-scripts
|
|
|
|
- uses: actions/download-artifact@v4
|
|
with:
|
|
name: dsh-npm-tarballs
|
|
path: dist/npm
|
|
|
|
- name: Publish tarballs
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
run: pnpm run release:publish --family dsh --from dist/npm
|