Skip to content

Expose Terraform release matrix#1996

Draft
gunzip wants to merge 2 commits into
feats/releasable-terraform-environmentsfrom
feats/expose-terraform-release-matrix
Draft

Expose Terraform release matrix#1996
gunzip wants to merge 2 commits into
feats/releasable-terraform-environmentsfrom
feats/expose-terraform-release-matrix

Conversation

@gunzip

@gunzip gunzip commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Why

Release orchestration needs an authoritative list of Terraform environments included in a merged Version Packages PR without re-querying or inferring deployment inputs downstream.

What changed

  • Add a fail-closed script that maps released tags to Nx environment projects and validated deployment metadata.
  • Expose release mode, published PR number, and the environment matrix from the nx-release action.
  • Keep manual publish-all recovery limited to public package projects.
  • Add unit tests, documentation, the committed script bundle, and a version plan.

This PR only exposes metadata; it does not dispatch deployment workflows.

Validation

  • pnpm nx run nx-release:test:coverage
  • pnpm nx run-many -t lint typecheck -p nx-release
  • pnpm nx run nx-release:build

Depends on #1995.

Extracted from #1926.

Return fail-closed environment deployment metadata from nx-release publishes so callers can orchestrate deployments independently from package publishing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the actions/nx-release composite action to surface an authoritative “released Terraform environments” matrix derived from the latest merged Version Packages PR metadata, enabling downstream release orchestration to consume validated deployment metadata without re-inferring it.

Changes:

  • Added a new script to map released tags to Nx environment projects and output a JSON matrix of deployable Terraform environments.
  • Exposed additional action outputs (release-mode, published-pr-number, released-environment-matrix) and wired matrix extraction into the publish flow.
  • Updated documentation and added unit tests plus a version plan for the nx-release action.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
actions/nx-release/tsup.config.ts Bundles the new extraction script into the action’s committed scripts/dist output.
actions/nx-release/scripts/extract-infra-projects-to-apply.ts New fail-closed extractor that resolves released environment projects and their deployment metadata into a JSON matrix.
actions/nx-release/scripts/tests/extract-infra-projects-to-apply.test.ts Unit tests covering happy path and failure modes for the new extractor.
actions/nx-release/README.md Documents new outputs and the publish behavior around Terraform environment metadata.
actions/nx-release/action.yaml Adds new outputs and emits the released environment matrix during publish.
.nx/version-plans/version-plan-1784226943067.md Declares a minor version bump for nx-release to ship the new exposed metadata.

Comment thread actions/nx-release/scripts/extract-infra-projects-to-apply.ts
Comment thread actions/nx-release/scripts/extract-infra-projects-to-apply.ts
Comment thread actions/nx-release/scripts/__tests__/extract-infra-projects-to-apply.test.ts Outdated
Comment thread actions/nx-release/action.yaml
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@gunzip
gunzip temporarily deployed to bootstrapper-dev-ci July 17, 2026 07:35 — with GitHub Actions Inactive
@gunzip
gunzip temporarily deployed to infra-prod-ci July 17, 2026 07:35 — with GitHub Actions Inactive
@gunzip
gunzip temporarily deployed to bootstrapper-prod-ci July 17, 2026 07:35 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants