| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- # Pack 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
- # workflow_dispatch of release-publish.yml from a dsh-v* tag.
- name: Release (dsh)
- on:
- pull_request:
- push:
- branches: [master]
- workflow_dispatch:
- permissions:
- contents: read
- concurrency:
- # Pack runs per ref so concurrent pull requests never displace each other.
- 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
- 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
|