Skip to content

Commit bfb5c0a

Browse files
committed
fix: upgrade changesets/action to v2 for CLI 3 compatibility
CLI 3 reports published packages via CHANGESETS_OUTPUT instead of New tag: stdout lines. Action v1 only scrapes those lines, so publish would skip git tags and GitHub releases. Action v2 also renamed inputs and no longer writes .npmrc from NPM_TOKEN.
1 parent 1594e97 commit bfb5c0a

3 files changed

Lines changed: 17 additions & 15 deletions

File tree

‎.github/workflows/bootstrap-npm-packages.yml‎

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,18 @@ jobs:
5656

5757
# This job intentionally has no id-token permission. npm prefers OIDC when
5858
# it is available, but a package cannot use OIDC until it exists on npm and
59-
# has a trusted publisher configured.
60-
- name: Publish missing packages to npm
61-
uses: changesets/action@v1
62-
with:
63-
publish: pnpm changeset:publish
59+
# has a trusted publisher configured. Action v2 no longer writes .npmrc
60+
# from NPM_TOKEN, so configure token auth here before publish.
61+
- name: Configure npm bootstrap token
6462
env:
65-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6663
NPM_TOKEN: ${{ secrets.NPM_BOOTSTRAP_TOKEN }}
64+
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> "$HOME/.npmrc"
65+
66+
- name: Publish missing packages to npm
67+
uses: changesets/action@v2
68+
with:
69+
publish-script: pnpm changeset:publish
70+
github-token: ${{ secrets.GITHUB_TOKEN }}
6771

6872
- name: Record trusted publishing follow-up
6973
if: success()

‎.github/workflows/publish.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,11 @@ jobs:
9393
9494
- name: Publish to npm
9595
id: changesets
96-
uses: changesets/action@v1
96+
uses: changesets/action@v2
9797
with:
98-
publish: pnpm changeset:publish
98+
publish-script: pnpm changeset:publish
99+
github-token: ${{ secrets.GITHUB_TOKEN }}
99100
env:
100-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
101101
PNPM_CONFIG_PROVENANCE: true
102102
# keep for now just in case
103103
NPM_CONFIG_PROVENANCE: true

‎.github/workflows/release.yml‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,9 @@ jobs:
4444

4545
- name: Create or update release pull request
4646
id: changesets
47-
uses: changesets/action@v1
47+
uses: changesets/action@v2
4848
with:
4949
github-token: ${{ github.token }}
50-
version: pnpm changeset:version
51-
commit: Version Packages
52-
title: Version Packages
53-
env:
54-
GITHUB_TOKEN: ${{ github.token }}
50+
version-script: pnpm changeset:version
51+
commit-message: Version Packages
52+
pr-title: Version Packages

0 commit comments

Comments
 (0)