Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/light-mirrors-tickle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"types-react-codemod": patch
---

Switch to trusted publishing
7 changes: 6 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ on:
jobs:
release:
name: Release
environment: production
permissions:
id-token: write # Required for OIDC
# Changesets creates a commit and PR for the release
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
Expand All @@ -31,7 +37,6 @@ jobs:
publish: yarn release
Copy link

Copilot AI Nov 27, 2025

Choose a reason for hiding this comment

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

When using npm trusted publishing with OIDC, the publish command should include the --provenance flag to generate attestations. Add publishArgs: '--provenance' to the changesets action configuration:

- name: Create Release Pull Request or Publish to npm
  id: changesets
  uses: changesets/action@v1
  with:
    publish: yarn release
    publishArgs: '--provenance'
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

This ensures that npm packages are published with provenance attestations, which is a key benefit of trusted publishing.

Suggested change
publish: yarn release
publish: yarn release
publishArgs: '--provenance'

Copilot uses AI. Check for mistakes.
Copy link
Owner Author

Choose a reason for hiding this comment

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

This should no longer be needed.

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_AUTOMATION_TOKEN }}

- name: Debug release
# Shows files included in release
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@
"access": "public"
},
"volta": {
"node": "20.18.1"
"node": "24.11.1"
}
}