release-vendor.yml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. # Pack the vendored framework sequence: the nine rescoped Cordis packages under
  2. # vendor/, each on its own version line. This sequence releases independently of
  3. # dsh and of the native packages.
  4. #
  5. # Pack runs without credentials on every pull request and master push.
  6. # Publication is a manual workflow_dispatch of release-vendor-publish.yml from a
  7. # vendor-* tag; a vendor release can carry several versions, so each package has
  8. # its own tag.
  9. name: Release (vendor)
  10. on:
  11. pull_request:
  12. push:
  13. branches: [master]
  14. workflow_dispatch:
  15. permissions:
  16. contents: read
  17. concurrency:
  18. # Pack runs per ref so concurrent pull requests never displace each other.
  19. group: ${{ github.workflow }}-${{ github.ref }}
  20. cancel-in-progress: false
  21. env:
  22. PRIMARY_NODE_VERSION: '24'
  23. DSH_TELEMETRY_DISABLED: '1'
  24. jobs:
  25. pack:
  26. name: Pack npm tarballs
  27. runs-on: ubuntu-24.04
  28. steps:
  29. # Complete history: the release scripts read tags.
  30. - uses: actions/checkout@v6
  31. with:
  32. fetch-depth: 0
  33. persist-credentials: false
  34. - uses: pnpm/action-setup@v4
  35. with:
  36. dest: ${{ runner.temp }}/setup-pnpm
  37. - uses: actions/setup-node@v6
  38. with:
  39. node-version: ${{ env.PRIMARY_NODE_VERSION }}
  40. - name: Configure pnpm store path
  41. id: pnpm-store
  42. run: |
  43. store_root="$HOME/.local/share/pnpm/store"
  44. echo "PNPM_CONFIG_STORE_DIR=$store_root" >> "$GITHUB_ENV"
  45. store_path=$(PNPM_CONFIG_STORE_DIR="$store_root" pnpm store path --silent)
  46. echo "path=$store_path" >> "$GITHUB_OUTPUT"
  47. - uses: actions/cache/restore@v4
  48. with:
  49. path: ${{ steps.pnpm-store.outputs.path }}
  50. key: ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
  51. restore-keys: |
  52. ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-
  53. - name: Install (immutable)
  54. run: pnpm install --frozen-lockfile
  55. - name: Verify release version
  56. run: pnpm run release:verify --family vendor
  57. # The vendored packages publish their own sources and build outputs; the
  58. # host build produces what their manifests select.
  59. - name: Build
  60. run: pnpm run build:lib:host
  61. # Concurrency here is rehearsal-only: the credentialed publish workflows
  62. # invoke release:pack without the flag and keep the strictly serial path.
  63. - name: Pack release tarballs
  64. run: pnpm run release:pack --family vendor --out dist/npm-vendor --concurrency 8
  65. - name: Verify packed install
  66. run: pnpm run release:verify-packed-install --family vendor --from dist/npm-vendor
  67. - uses: actions/upload-artifact@v4
  68. with:
  69. name: vendor-npm-tarballs
  70. path: dist/npm-vendor/*
  71. if-no-files-found: error
  72. retention-days: 7