release-vendor.yml 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. - name: Pack release tarballs
  62. run: pnpm run release:pack --family vendor --out dist/npm-vendor
  63. - name: Verify packed install
  64. run: pnpm run release:verify-packed-install --family vendor --from dist/npm-vendor
  65. - uses: actions/upload-artifact@v4
  66. with:
  67. name: vendor-npm-tarballs
  68. path: dist/npm-vendor/*
  69. if-no-files-found: error
  70. retention-days: 7