mirror of
https://github.com/deepseek-ai/deepseek-harness
synced 2026-08-15 21:04:50 +00:00
Merge branch 'master' into ci/selfhosted-windows-runners
This commit is contained in:
4
.github/workflows/landlock-run-release.yml
vendored
4
.github/workflows/landlock-run-release.yml
vendored
@@ -172,5 +172,7 @@ jobs:
|
||||
tag_args=()
|
||||
case "$version" in *-*) tag_args=(--tag next);; esac
|
||||
while IFS= read -r tarball; do
|
||||
npm publish "dist/npm/${tarball}" --access public "${tag_args[@]}"
|
||||
# No --access: publishConfig.access in each manifest decides, and a
|
||||
# command-line flag would override it.
|
||||
npm publish "dist/npm/${tarball}" "${tag_args[@]}"
|
||||
done < dist/npm/publish-order.txt
|
||||
|
||||
132
.github/workflows/release-vendor.yml
vendored
Normal file
132
.github/workflows/release-vendor.yml
vendored
Normal file
@@ -0,0 +1,132 @@
|
||||
# Pack and publish the vendored framework sequence: the nine rescoped Cordis
|
||||
# packages under vendor/, each on its own version line. This sequence releases
|
||||
# independently of dsh and of the native packages.
|
||||
#
|
||||
# Pack runs without credentials on every pull request and master push.
|
||||
# Publication is a manual dispatch from a vendor-* tag; a vendor release can
|
||||
# carry several versions, so each package has its own tag.
|
||||
name: Release (vendor)
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches: [master]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
publish:
|
||||
description: Publish the packed tarballs to npm. Must run from a vendor-* tag.
|
||||
required: true
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
# Pack runs per ref so concurrent pull requests never displace each
|
||||
# other; the publish job below serializes the shared dist-tag state.
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: false
|
||||
|
||||
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: ${{ inputs.publish }}
|
||||
run: pnpm run release:verify --family vendor
|
||||
|
||||
# The vendored packages publish their own sources and build outputs; the
|
||||
# host build produces what their manifests select.
|
||||
- name: Build
|
||||
run: pnpm run build:lib:host
|
||||
|
||||
- name: Pack release tarballs
|
||||
run: pnpm run release:pack --family vendor --out dist/npm-vendor
|
||||
|
||||
- name: Verify packed install
|
||||
run: pnpm run release:verify-packed-install --family vendor --from dist/npm-vendor
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: vendor-npm-tarballs
|
||||
path: dist/npm-vendor/*
|
||||
if-no-files-found: error
|
||||
retention-days: 7
|
||||
|
||||
publish:
|
||||
name: Publish to npm
|
||||
if: inputs.publish
|
||||
needs: pack
|
||||
runs-on: ubuntu-24.04
|
||||
environment: npm-publish
|
||||
concurrency:
|
||||
group: Release-publish
|
||||
cancel-in-progress: false
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
# Checkout and install carry the release scripts only; no build step.
|
||||
- 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: vendor-npm-tarballs
|
||||
path: dist/npm-vendor
|
||||
|
||||
- name: Publish tarballs
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
run: pnpm run release:publish --family vendor --from dist/npm-vendor
|
||||
147
.github/workflows/release.yml
vendored
Normal file
147
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,147 @@
|
||||
# Pack and publish the dsh release sequence: every package under packages/ plus
|
||||
# the apps/ entries, all on one version. The vendored framework and the native
|
||||
# packages are separate sequences with their own workflows and version lines.
|
||||
#
|
||||
# Pack runs without credentials on every pull request and master push, so a
|
||||
# pull request proves the whole publish set still packs. Publication is a
|
||||
# manual dispatch from a dsh-v* tag and consumes exactly the packed bytes.
|
||||
name: Release (dsh)
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches: [master]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
publish:
|
||||
description: Publish the packed tarballs to npm. Must run from a dsh-v* tag.
|
||||
required: true
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
# Pack runs per ref so concurrent pull requests never displace each
|
||||
# other; the publish job below serializes the shared dist-tag state.
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: false
|
||||
|
||||
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: ${{ inputs.publish }}
|
||||
run: pnpm run release:verify --family dsh
|
||||
|
||||
- name: Build
|
||||
run: pnpm run build
|
||||
|
||||
- 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
|
||||
# job has no credentials for the private registry, so the verification
|
||||
# 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
|
||||
if: inputs.publish
|
||||
needs: pack
|
||||
runs-on: ubuntu-24.04
|
||||
# Required reviewers and the allowed tags live on the environment; this is
|
||||
# the only step 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
|
||||
Reference in New Issue
Block a user