1f00ac6311
- Remove the `publish-npm` job from `release.yml`. It has been failing on every release with `npm error code EOTP` because the configured `NPM_TOKEN` doesn't bypass 2FA. Manual publish from a developer machine is the actual ship path; codify that. - Update `docs/RELEASE_RUNBOOK.md` "npm Wrapper Release" to describe the manual flow (`npm publish --access public` + OTP) and explain why the auto path is gone, with a recovery note for future Trusted-Publishing migration. - Refresh stale cross-reference comment in `publish-npm.yml` (the workflow remains as inert plumbing for an eventual Trusted Publishing setup). - Stop tracking `docs/DeepSeek_V4.pdf` (4.4 MB). It was never referenced outside test fixture filenames; the tests synthesize their own fake PDF. Add to `.gitignore` so a local copy can sit there without nagging. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
131 lines
4.4 KiB
YAML
131 lines
4.4 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags: ['v*']
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: 'Package/release version to publish to npm, without the leading v'
|
|
required: true
|
|
type: string
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
RUSTFLAGS: -Dwarnings
|
|
|
|
jobs:
|
|
parity:
|
|
if: github.event_name == 'push'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: clippy, rustfmt
|
|
- uses: Swatinem/rust-cache@v2
|
|
- name: Format check
|
|
run: cargo fmt --all -- --check
|
|
- name: Compile check
|
|
run: cargo check --workspace --all-targets --locked
|
|
- name: Clippy
|
|
run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
|
|
- name: Workspace tests
|
|
run: cargo test --workspace --all-features --locked
|
|
- name: TUI snapshot parity
|
|
run: cargo test -p deepseek-tui-core --test snapshot --locked
|
|
- name: Protocol schema parity
|
|
run: cargo test -p deepseek-protocol --test parity_protocol --locked
|
|
- name: State persistence parity
|
|
run: cargo test -p deepseek-state --test parity_state --locked
|
|
- name: Lockfile drift guard
|
|
run: git diff --exit-code -- Cargo.lock
|
|
|
|
build:
|
|
needs: parity
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
# --- deepseek (cli) ---
|
|
- os: ubuntu-latest
|
|
target: x86_64-unknown-linux-gnu
|
|
binary: deepseek
|
|
artifact_name: deepseek-linux-x64
|
|
- os: macos-latest
|
|
target: x86_64-apple-darwin
|
|
binary: deepseek
|
|
artifact_name: deepseek-macos-x64
|
|
- os: macos-latest
|
|
target: aarch64-apple-darwin
|
|
binary: deepseek
|
|
artifact_name: deepseek-macos-arm64
|
|
- os: windows-latest
|
|
target: x86_64-pc-windows-msvc
|
|
binary: deepseek.exe
|
|
artifact_name: deepseek-windows-x64.exe
|
|
# --- deepseek-tui (TUI) ---
|
|
- os: ubuntu-latest
|
|
target: x86_64-unknown-linux-gnu
|
|
binary: deepseek-tui
|
|
artifact_name: deepseek-tui-linux-x64
|
|
- os: macos-latest
|
|
target: x86_64-apple-darwin
|
|
binary: deepseek-tui
|
|
artifact_name: deepseek-tui-macos-x64
|
|
- os: macos-latest
|
|
target: aarch64-apple-darwin
|
|
binary: deepseek-tui
|
|
artifact_name: deepseek-tui-macos-arm64
|
|
- os: windows-latest
|
|
target: x86_64-pc-windows-msvc
|
|
binary: deepseek-tui.exe
|
|
artifact_name: deepseek-tui-windows-x64.exe
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
targets: ${{ matrix.target }}
|
|
- run: cargo build --release --locked --target ${{ matrix.target }}
|
|
- name: Rename binary
|
|
shell: bash
|
|
run: |
|
|
cp target/${{ matrix.target }}/release/${{ matrix.binary }} ${{ matrix.artifact_name }}
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ${{ matrix.artifact_name }}
|
|
path: ${{ matrix.artifact_name }}
|
|
release:
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- uses: actions/download-artifact@v4
|
|
with:
|
|
path: artifacts
|
|
- name: List artifacts
|
|
run: find artifacts -type f
|
|
- name: Generate checksum manifest
|
|
shell: bash
|
|
run: |
|
|
mkdir -p artifacts/checksums
|
|
manifest="artifacts/checksums/deepseek-artifacts-sha256.txt"
|
|
: > "${manifest}"
|
|
while IFS= read -r -d '' file; do
|
|
hash="$(sha256sum "${file}" | awk '{print $1}')"
|
|
base="$(basename "${file}")"
|
|
printf '%s %s\n' "${hash}" "${base}" >> "${manifest}"
|
|
done < <(find artifacts -type f ! -path 'artifacts/checksums/*' -print0 | sort -z)
|
|
cat "${manifest}"
|
|
- uses: softprops/action-gh-release@v1
|
|
with:
|
|
files: artifacts/*/*
|
|
prerelease: false
|
|
|
|
# npm publish is intentionally not automated. The npm account requires 2FA OTP
|
|
# on every publish, and a granular automation token that bypasses 2FA has not
|
|
# been provisioned. Release the npm wrapper manually from a developer machine
|
|
# after the GitHub Release has been created — see CLAUDE.md "Releases" for the
|
|
# exact commands.
|