Skip to content

Commit 93bb1d6

Browse files
zimegClaude
andcommitted
ci: migrate changesets/action release workflow to v2
changesets/action v2 renamed the root action's inputs and outputs (changesets/action#681) and now pushes release commits/tags via the GitHub API, requiring the token through the `github-token` input rather than the `GITHUB_TOKEN` env var (changesets/action#692). #133 bumped the action 1.9.0 -> 2.1.1 but left the release workflow on the v1 interface, so v2 would silently ignore the inputs, resolve the renamed output to empty, and lose the token. Inputs (renamed, alphabetized): version -> version-script publish -> publish-script createGithubReleases -> create-github-releases commit -> commit-message title -> pr-title prDraft -> pr-draft Outputs: publishedPackages -> published-packages Token: moved from `env: GITHUB_TOKEN` to the `github-token` input. Values unchanged; verified against action.yml at the pinned v2.1.1 SHA. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
1 parent af65e79 commit 93bb1d6

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

.github/workflows/release.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,19 @@ jobs:
4040
id: changesets
4141
uses: changesets/action@8488615a623b1b9c987934bb89eae8af6a946ac1 # v2.1.1
4242
with:
43-
version: bash scripts/changeset_version.sh
44-
publish: npx changeset publish
45-
createGithubReleases: true
46-
commit: "chore: release"
47-
title: "chore: release"
48-
prDraft: create
49-
env:
50-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
commit-message: "chore: release"
44+
create-github-releases: true
45+
github-token: ${{ secrets.GITHUB_TOKEN }}
46+
pr-draft: create
47+
pr-title: "chore: release"
48+
publish-script: npx changeset publish
49+
version-script: bash scripts/changeset_version.sh
5150
- name: Get publication details
5251
id: release
5352
if: steps.changesets.outputs.published == 'true'
5453
env:
5554
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56-
PUBLISHED_PACKAGES: ${{ steps.changesets.outputs.publishedPackages }}
55+
PUBLISHED_PACKAGES: ${{ steps.changesets.outputs.published-packages }}
5756
run: |
5857
echo "url=$(gh release view --json url -q .url)" >> "$GITHUB_OUTPUT"
5958
echo "message=$(echo "$PUBLISHED_PACKAGES" | jq -r '.[] | "\(.name)@\(.version)"' | paste -sd ', ' -)" >> "$GITHUB_OUTPUT"

0 commit comments

Comments
 (0)