fix(release): update workflow to sync package-lock.json

- Call 'npm version' directly with --no-git-tag-version flag to ensure
  both package.json and package-lock.json are updated together
- Add 'alpha' option (default) for alpha version bumps
- Add 'beta' option to transition to/bump beta series
- Temporarily disable web bundles (tools/cli/bundlers/ is missing)

The workflow was previously calling non-existent npm scripts
(version:patch/minor/major) that were removed in the v6 refactor.

Note: This change cannot be fully tested without triggering an actual
release. The web bundles functionality requires a separate fix.

Fixes #1104

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Alex Verkhovsky 2025-12-14 13:22:13 -07:00
parent 4c65f3a006
commit 7fd21102bd
1 changed files with 13 additions and 42 deletions

View File

@ -6,9 +6,11 @@ on:
version_bump:
description: Version bump type
required: true
default: patch
default: alpha
type: choice
options:
- alpha
- beta
- patch
- minor
- major
@ -49,7 +51,12 @@ jobs:
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Bump version
run: npm run version:${{ github.event.inputs.version_bump }}
run: |
case "${{ github.event.inputs.version_bump }}" in
alpha) npm version prerelease --no-git-tag-version --preid=alpha ;;
beta) npm version prerelease --no-git-tag-version --preid=beta ;;
*) npm version ${{ github.event.inputs.version_bump }} --no-git-tag-version ;;
esac
- name: Get new version and previous tag
id: version
@ -61,34 +68,9 @@ jobs:
run: |
sed -i 's/"version": ".*"/"version": "${{ steps.version.outputs.new_version }}"/' tools/installer/package.json
- name: Generate web bundles
run: npm run bundle
- name: Package bundles for release
run: |
mkdir -p dist/release-bundles
# Copy web bundles
cp -r web-bundles dist/release-bundles/bmad-bundles-v${{ steps.version.outputs.new_version }}
# Verify bundles exist
if [ ! "$(ls -A dist/release-bundles/bmad-bundles-v${{ steps.version.outputs.new_version }})" ]; then
echo "❌ ERROR: No bundles found"
echo "This likely means 'npm run bundle' failed"
exit 1
fi
# Count and display bundles per module
for module in bmm bmb cis bmgd; do
if [ -d "dist/release-bundles/bmad-bundles-v${{ steps.version.outputs.new_version }}/$module/agents" ]; then
COUNT=$(find dist/release-bundles/bmad-bundles-v${{ steps.version.outputs.new_version }}/$module/agents -name '*.xml' 2>/dev/null | wc -l)
echo "✅ $module: $COUNT agents"
fi
done
# Create archive
tar -czf dist/release-bundles/bmad-bundles-v${{ steps.version.outputs.new_version }}.tar.gz \
-C dist/release-bundles/bmad-bundles-v${{ steps.version.outputs.new_version }} .
# TODO: Re-enable web bundles once tools/cli/bundlers/ is restored
# - name: Generate web bundles
# run: npm run bundle
- name: Commit version bump
run: |
@ -185,25 +167,15 @@ jobs:
npm publish --tag latest
fi
- name: Create GitHub Release with Bundles
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.version.outputs.new_version }}
name: "BMad Method v${{ steps.version.outputs.new_version }}"
body: |
${{ steps.release_notes.outputs.RELEASE_NOTES }}
## 📦 Web Bundles
Download XML bundles for use in AI platforms (Claude Projects, ChatGPT, Gemini):
- `bmad-bundles-v${{ steps.version.outputs.new_version }}.tar.gz` - All modules (BMM, BMB, CIS, BMGD)
**Browse online** (bleeding edge): https://bmad-code-org.github.io/bmad-bundles/
draft: false
prerelease: ${{ contains(steps.version.outputs.new_version, 'alpha') || contains(steps.version.outputs.new_version, 'beta') }}
files: |
dist/release-bundles/*.tar.gz
- name: Summary
run: |
@ -212,7 +184,6 @@ jobs:
echo "### 📦 Distribution" >> $GITHUB_STEP_SUMMARY
echo "- **NPM**: Published with @latest tag" >> $GITHUB_STEP_SUMMARY
echo "- **GitHub Release**: https://github.com/bmad-code-org/BMAD-METHOD/releases/tag/v${{ steps.version.outputs.new_version }}" >> $GITHUB_STEP_SUMMARY
echo "- **Web Bundles**: Attached to GitHub Release (4 archives)" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "### ✅ Installation" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`bash" >> $GITHUB_STEP_SUMMARY