Skip to content

Migrate latest-tagged web-features releases to trusted publishing#3917

Open
ddbeck wants to merge 9 commits into
web-platform-dx:mainfrom
ddbeck:trusted-publishing
Open

Migrate latest-tagged web-features releases to trusted publishing#3917
ddbeck wants to merge 9 commits into
web-platform-dx:mainfrom
ddbeck:trusted-publishing

Conversation

@ddbeck
Copy link
Copy Markdown
Collaborator

@ddbeck ddbeck commented Apr 1, 2026

This is the sequel to #3582.

Unfortunately, npm allows nominating only a single workflow per package as the "trusted publishing" workflow, so this consolidates the next and latest workflows into a single file.

Upon merging, the packages need configuration in npmjs.com (see this section of the npm docs and this area in the npm UI, if you have access). If you're not ready to do this yourself, then please approve and leave unmerged. Thank you!

@github-actions github-actions Bot added the tools and infrastructure Project internal tooling, such as linters, GitHub Actions, or repo settings label Apr 1, 2026
@ddbeck ddbeck changed the title Migrate latest-tagged releases to trusted publishing Migrate latest-tagged web-features releases to trusted publishing Apr 1, 2026
@ddbeck ddbeck force-pushed the trusted-publishing branch from 7e1c5ee to 4b8492e Compare April 1, 2026 15:44
@ddbeck ddbeck marked this pull request as draft April 1, 2026 16:21
@ddbeck ddbeck marked this pull request as ready for review April 1, 2026 16:40
@captainbrosset
Copy link
Copy Markdown
Contributor

You can only bless one workflow file to do trusted publishing. Until this PR, we had separate workflows. Now they have to be together. This is why the workflow is more complex than it used to be. It's consolidation.
Also changed a couple little things.

Comment on lines -7 to -13
paths:
- features/**
- groups/**
- packages/web-features/**
- snapshots/**
- index.ts
- scripts/build.ts
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.

Why don't we need this filter anymore in the new version?

Copy link
Copy Markdown
Contributor

@captainbrosset captainbrosset left a comment

Choose a reason for hiding this comment

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

Leaving a few comments first. I'm fine with the change, but first want to make sure I understand all the pieces.


publish_latest:
name: Publish release
if: ${{ github.repository == 'web-platform-dx/web-features' && case(startsWith(github.ref, 'refs/tags/'), 'latest', 'next') == 'latest' }}
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.

Maybe add a comment saying how the workflow runs on each push (because 'next' needs it) but this line filters only tags, for official releasing.

Also, can you explain why we need to filter on github.repository?


publish_next:
name: Publish prerelease
if: ${{ github.repository == 'web-platform-dx/web-features' && case(startsWith(github.ref, 'refs/tags/'), 'latest', 'next') == 'next' }}
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.

A comment here explaining the filtering logic would be good here too.

- name: Update the tag
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
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.

For my own knowledge, where does this bot user email address come from? The magic number part, I mean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tools and infrastructure Project internal tooling, such as linters, GitHub Actions, or repo settings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants