mirror of
https://github.com/bmadcode/BMAD-METHOD.git
synced 2025-12-17 09:45:25 +00:00
fix(release): restore automated release workflow for v6 (#1139)
* 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> * fix(release): simplify version bump logic Modern npm (v11+) correctly handles --preid flag transitions: - prerelease --preid=beta on alpha.X produces beta.0 (works!) - prerelease --preid=alpha on alpha.X produces alpha.X+1 (works!) CodeRabbit warning was based on outdated npm behavior. Consolidate alpha|beta into single case for cleaner code. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Brian <bmadcode@gmail.com>
This commit is contained in:
parent
ebb20f675f
commit
9fe79882b2
54
.github/workflows/manual-release.yaml
vendored
54
.github/workflows/manual-release.yaml
vendored
@ -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,11 @@ 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|beta) npm version prerelease --no-git-tag-version --preid=${{ github.event.inputs.version_bump }} ;;
|
||||
*) npm version ${{ github.event.inputs.version_bump }} --no-git-tag-version ;;
|
||||
esac
|
||||
|
||||
- name: Get new version and previous tag
|
||||
id: version
|
||||
@ -61,34 +67,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 +166,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 +183,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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user