Skip to content

Conversation

@tanjeemh
Copy link

@tanjeemh tanjeemh commented Nov 12, 2025

What problem are we solving?
Trigger release to npmjs using OIDC Trusted Publishing w/ Github Environments. Using Github Environments will enforce security through protected branch deployments and designated reviewer requirements.

Why solve it this way?
/io-ts uses the semantic-release-action/typescript/.../release.yml reusable workflow to run semantic-release. We triggered a beta-release v3.2.0-beta.1 that accepts environment as an input. That way, we can pass environment: publish input inside of /io-ts/.../release.yaml.

Note: A follow-up PR will be opened after we can confirm that publishing using the environment works using the beta version of semantic-release-action/typescript here.
It will be as simple as triggering an official release in semantic-release-action/typescript and then pinning that version in io-ts.

Ticket: DX-2084

**What problem are we solving?**
Trigger release to npmjs using OIDC Trusted Publishing w/ Github Environments.
Using Github Environments will enforce security through protected branch deployments and designated reviewer requirements.

**Why solve it this way?**
/io-ts uses the `semantic-release-action/typescript/.../release.yml` reusable workflow to run semantic-release.
We triggered a beta-release v3.2.0-beta.1 that accepts `environment` as an input. That way, we can pass `environment: publish` input inside of `/io-ts/.../release.yaml`.

Ticket: DX-2084
@tanjeemh tanjeemh requested a review from a team as a code owner November 12, 2025 20:43
jobs:
release:
uses: semantic-release-action/typescript/.github/workflows/release.yml@70c4b6f612fd516692472d20eac1c590ac08cd20 # v3.1.0
uses: semantic-release-action/typescript/.github/workflows/release.yml@fd8c4abce3b0710e4e0d0ecf17fdaf2e770d4c82 # v3.2.0-beta.1

Choose a reason for hiding this comment

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

How long will this repo rely on a beta version of semantic-release-action/typescript? What's the path to getting onto a non-beta release?

Copy link
Author

Choose a reason for hiding this comment

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

As soon as we can confirm publishing through the environment works, it will be as simple as pushing beta to master in semantic-release-action/typescript, and opening a PR that reflects the changes here in io-ts.
Super quick implementation

Choose a reason for hiding this comment

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

As soon as we can confirm publishing through the environment works

What is the path to doing this though? I'm confused because this PR is against master and does not trigger a release. (Good, because we don't want to make a release to the default distribution channel in this package.) But then, how will we confirm if publishing through the environment works?

Copy link
Author

@tanjeemh tanjeemh Nov 13, 2025

Choose a reason for hiding this comment

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

Ah I understand your confusion. My understanding is that the release check will run and prompt us to authenticate using the publish environment.
However because we are using the "ci:" prefix, we should see a message in the logs similar to:

ci: add OIDC Trusted Publishing w/ Github Environments
[semantic-release] Release will not trigger due to "ci" prefix

So the purpose of this PR is to check that the release.yaml will trigger a deployment confirmation in the publish environment. If we can get the green checkmark on this, thats all we need to ensure that OIDC Trusted Publishing will work.

This is actually intended, because I want to test the edge case of what would happen if someone did everything correctly - they push to the deployment branch specified in the Github Environment, they get an approval from a required reviewer, BUT they don't use the correct prefix (fix, feat, etc.); hence it should not release to npmjs.

I don't believe this edge case has been tested yet, and I think would be very useful information.

Choose a reason for hiding this comment

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

All right, sure. Thanks for clearing that up!

@ericcrosson-bitgo ericcrosson-bitgo merged commit 54a35e0 into master Nov 13, 2025
3 checks passed
@ericcrosson-bitgo ericcrosson-bitgo deleted the DX-2084 branch November 13, 2025 21:46
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.

3 participants