Skip to content

Commit 74dc0b5

Browse files
ci(release): replace release.sh prepare hook with explicit named workflow steps
The build-dist and kit-version-update responsibilities previously hidden inside scripts/release.sh (called via semantic-release's prepareCmd hook) are now two named, visible steps in the staging-step-1.yml release job: 1. 'Build distribution bundle' — npm run build + git add dist -f + commit 2. 'Update kit versions to X.Y.Z' — npm pkg set version for every kit in kits/matrix.json + commit kits/**/package.json Both steps run only on a real release (dryRun == 'false') and execute after the existing dry-run step captures the next version, so the version is available via steps.get-version.outputs.version. release.config.js is updated in lockstep: - prepareCmd removed from @semantic-release/exec (only publishCmd remains) - kits/**/package.json removed from @semantic-release/git assets (those package.jsons are now committed by the explicit workflow step before semantic-release runs, so they are already clean when the git plugin stages its assets) The end-to-end ordering is unchanged: the two prep commits land on the local staging branch before npx semantic-release runs; @semantic-release/git pushes all local commits to staging; release-kits (which needs: release) then checks out the updated staging branch and publishes each kit at the correct version. Refs #1210 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent aa071b2 commit 74dc0b5

3 files changed

Lines changed: 18 additions & 19 deletions

File tree

.github/workflows/staging-step-1.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,24 @@ jobs:
366366
fi
367367
echo "version=$NEXT_VERSION" >> "$GITHUB_OUTPUT"
368368
369+
- name: Build distribution bundle
370+
if: ${{ github.event.inputs.dryRun == 'false' }}
371+
run: |
372+
npm run build
373+
git add dist -f
374+
git commit -m 'chore(build): Generate latest bundle [skip ci]'
375+
376+
- name: Update kit versions to ${{ steps.get-version.outputs.version }}
377+
if: ${{ github.event.inputs.dryRun == 'false' }}
378+
run: |
379+
VERSION=${{ steps.get-version.outputs.version }}
380+
jq -r '.[].local_path' kits/matrix.json | while read KIT_PATH; do
381+
npm pkg set version="$VERSION" --prefix "$KIT_PATH"
382+
echo "Updated $KIT_PATH/package.json to $VERSION"
383+
done
384+
git add kits/
385+
git commit -m "chore(release): Update kit versions to $VERSION [skip ci]"
386+
369387
- name: Release
370388
if: ${{ github.event.inputs.dryRun == 'false' }}
371389
run: |

release.config.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ module.exports = {
4242
[
4343
'@semantic-release/exec',
4444
{
45-
prepareCmd: 'sh ./scripts/release.sh ${nextRelease.version}',
4645
publishCmd: 'npm publish',
4746
},
4847
],
@@ -65,7 +64,6 @@ module.exports = {
6564
'package.json',
6665
'package-lock.json',
6766
'CHANGELOG.md',
68-
'kits/**/package.json',
6967
],
7068
message:
7169
'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}',

scripts/release.sh

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)