The root manifest carries the dsh family version. bump writes it with the members, because the workspace constraint requires them to match, and that constraint now accepts a prerelease segment: without both, release:dsh 0.0.2 left the root behind and 0.0.1-rc.1 could satisfy neither check. The Landlock workflow no longer passes --access public, which overrode the restricted publishConfig this repository just adopted for those packages. Vendored change detection reads build inputs when a package publishes build output, and vendor/cordis publishes the src its export map already pointed at: its lib/ is untracked, so a real source edit read as 'nothing changed' and the next publish would fail on a version whose bytes moved. The next version also takes the last published version as its baseline, so a re-sync that restores a lower upstream version cannot recompute a version already on the registry, and bump confirms the registry carries what the newest tag names. Tag prefixes are constructed rather than recovered from a full tag, which a hyphenated version defeated. Pack runs group per ref so concurrent pull requests stop displacing each other, the publish job carries the global group, and the unused id-token permission is gone. Every release script sits behind an entry guard, which is what lets the pure judgements carry tests: tag naming, publish order and cycle reporting, version arithmetic, payload policy, and the change judgement. The Agent Note moves to implemented and states what shipped: one probe command, the registry confirmation that now exists, and byte reproducibility recorded as assumed rather than measured.
133 lines
4.0 KiB
YAML
133 lines
4.0 KiB
YAML
# 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
|