Skip to content

chore: consolidate release workflows for npm OIDC - #192

Merged
jsteinich merged 3 commits into
open-constructs:mainfrom
X-Guardian:chore/consolidate-release-workflows
May 23, 2026
Merged

jsteinich merged 3 commits into
open-constructs:mainfrom
X-Guardian:chore/consolidate-release-workflows

Conversation

@X-Guardian

@X-Guardian X-Guardian commented May 22, 2026 •

Copy link
Copy Markdown
Contributor

Description

We can't use npm OIDC trusted publishing today because the same packages publish from two different workflow files, and npm's trusted-publisher config matches on a single workflow filename. Consolidating into one file unblocks OIDC and removes NPM_TOKEN from the loop.

Summary

  • Merge release_next.yml into release.yml so the same workflow file publishes both the release and @next channels - a precondition for switching to npm OIDC trusted publishing (npm binds trusted publishers to repository + workflow filename).
  • Extract the publish phase into a reusable release-publish.yml workflow called twice (once per channel). Replaces 10 nearly-identical publish jobs (npm / pypi / maven / nuget / golang × release/next) with 2 callers.
  • Add publib to root devDependencies; replace npx -p publib publib-X with yarn publib-X so publib is version-pinned and not re-resolved on every run. Required publib >= 0.2.1009 for OIDC support (we pin to ^0.2.1047).
  • Scaffold the OIDC switch (permissions: id-token: write, NPM_TRUSTED_PUBLISHER: "true") as commented-out lines, ready to uncomment once trusted publishers are configured on npmjs.com.

Checklist

  • I have updated the PR title to match CDKTN's style guide
  • I have run the linter on my code locally
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation if applicable
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works if applicable
  • New and existing unit tests pass locally with my changes

@X-Guardian
X-Guardian marked this pull request as ready for review May 22, 2026 21:15
@X-Guardian
X-Guardian requested a review from a team as a code owner May 22, 2026 21:15

@jsteinich jsteinich 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.

There's definitely room for additional consolidation (release and next have some differences, but wouldn't be too much effort to conditionalize), but we could do that in a follow-up PR.

I also think we could just skip the whole next flow when we are doing an actual release. It's a bunch of CI time for something that is unlikely to actually be used (it's the same code). That could also be done in a follow-up.

Comment thread .github/workflows/release.yml Resolved
Comment thread .github/workflows/release.yml Resolved
@X-Guardian
X-Guardian force-pushed the chore/consolidate-release-workflows branch from 951c347 to a1c5e95 Compare May 23, 2026 09:15

@X-Guardian X-Guardian left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Agreed that there is room for further refinement. In this PR I intentionally tried to not change the behaviour of the current workflows to keep the diff to a minimum.

Comment thread .github/workflows/release.yml Resolved
Comment thread .github/workflows/release.yml Resolved
@jsteinich
jsteinich merged commit 7c5855e into open-constructs:main May 23, 2026
525 of 528 checks passed
@jsteinich jsteinich mentioned this pull request May 23, 2026
8 tasks done
jsteinich added a commit that referenced this pull request May 23, 2026
### Description

Enables NPM OIDC publishing (already configured) so that we no longer
need to use a token.

Also fixes an issue introduced in #192 by making the edge provider
binding artifact name configurable.

### Checklist

- [x] I have updated the PR title to match [CDKTN's style
guide](https://github.com/open-constructs/cdk-terrain/blob/main/CONTRIBUTING.md#pull-requests-1)
- [x] I have run the linter on my code locally
- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the
[documentation](https://github.com/open-constructs/cdk-terrain-docs/tree/main/content)
if applicable
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works if applicable
- [x] New and existing unit tests pass locally with my changes

<!-- If this is still a work in progress, feel free to open a draft PR
until you're able to check off all the items on the list above -->
@X-Guardian
X-Guardian deleted the chore/consolidate-release-workflows branch May 24, 2026 10:30
jsteinich added a commit that referenced this pull request May 26, 2026
## 0.23.2

### chore
- chore: Update npm version to support OIDC trusted publishing
[\#205](#205)
- chore: Fix publib running to use npx rather than yarn
[\#203](#203)
- chore(tests): Add test for Node type stripping
[\#198](#198)
- chore(gha): Enable NPM OIDC Publishing
[\#195](#195)
- chore: remove mention of Hashicorp support
[\#193](#193)
- chore: consolidate release workflows for npm OIDC
[\#192](#192)
- chore: tell users to search for cdktn on npm
[\#185](#185)
- chore: replace cdk.tf/modules-and-providers links
[\#184](#184)
- chore: fix references to cdktf in TS examples
[\#183](#183)
- chore: point to correct docs repo
[\#181](#181)
- chore: delete Vercel config for cdk.tf site
[\#180](#180)
- chore(gha): optimise integration & provider-integration CI pipelines
[\#178](#178)
- chore(gha): optimise examples CI pipeline
[\#175](#175)
- chore: migrate jest to @nx/jest plugin with swc-jest
[\#160](#160)
- chore: replace yazl with fflate
[\#148](#148)
- chore(lib): Move cdktn package to src/ and lib/ layout
[\#145](#145)
- chore: Consolidate PR CI into tiered orchestrator workflow
[\#143](#143)

### fix

- fix(gha): Need to grant permission on workflow call job
[\#196](#196)
- fix(cli): Fix input getting split between cdktn and Terraform
[\#191](#191)
- fix(cli): restore non-bundled dependencies
[\#190](#190)
- fix: Configurable dist artifact name to fix release workflows
[\#189](#189)
- fix(tests): pass --no-compile to pip in python integration tests
[\#188](#188)
- fix(cli): pass languageOptions to `get`
[\#179](#179)
- fix(provider-generator): add missing semicolons
[\#177](#177)

### feat

- feat(provider-generator): configurable import extensions
[\#151](#151)
@github-actions

Copy link
Copy Markdown
Contributor

I'm going to lock this pull request because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jun 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants