Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
169 changes: 0 additions & 169 deletions .github/workflows/manual-release.yaml

This file was deleted.

133 changes: 133 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
name: Release

on:
workflow_dispatch:
inputs:
bump:
description: "Version bump type"
required: true
default: "patch"
type: choice
options:
- patch
- minor
- major

concurrency:
group: release
cancel-in-progress: false

permissions:
id-token: write
contents: write

jobs:
release:
if: github.repository == 'bmad-code-org/bmad-builder' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Generate GitHub App token
id: app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ secrets.RELEASE_APP_ID }}
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}

- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ steps.app-token.outputs.token }}

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "npm"

- name: Configure git user
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

- name: Install dependencies
run: npm ci

- name: Run validation
run: |
npm run format:check
npm run lint:md

- name: Bump version
run: |
npm version ${{ inputs.bump }} -m "chore(release): v%s [skip ci]"

- name: Capture new version
id: version
run: |
VERSION=$(node -p "require('./package.json').version")
echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "tag=v${VERSION}" >> $GITHUB_OUTPUT

- name: Push version commit and tag
run: git push origin main --follow-tags

- name: Install cosign
uses: sigstore/cosign-installer@v3

- name: Sign tag SHA with cosign (keyless)
run: |
TAG="${{ steps.version.outputs.tag }}"
SHA=$(git rev-parse "${TAG}")
Copy link
Copy Markdown

@augmentcode augmentcode Bot Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In .github/workflows/release.yaml:78, git rev-parse "${TAG}" will resolve to the tag object SHA if the tag ever becomes annotated, which can make the signed/printed “tag SHA” differ from the commit the tag points to. That mismatch would be confusing for downstream verification and the workflow summary.

Other locations where this applies: .github/workflows/release.yaml:123

Severity: medium

Other Locations
  • .github/workflows/release.yaml:123

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

printf '%s' "${SHA}" > "${TAG}.sha"
cosign sign-blob --yes \
--output-signature "${TAG}.sig" \
--output-certificate "${TAG}.pem" \
"${TAG}.sha"

- name: Create GitHub Release
run: |
TAG="${{ steps.version.outputs.tag }}"
VERSION="${{ steps.version.outputs.version }}"
BODY=$(awk -v ver="$VERSION" '
/^## \[/ { if (found) exit; if (index($0, "## [" ver "]")) found=1; next }
found { print }
' CHANGELOG.md)
if [ -z "$BODY" ]; then
echo "::error::No CHANGELOG.md entry found for $TAG. Add a '## [${VERSION}] - YYYY-MM-DD' section before releasing."
exit 1
fi
gh release create "$TAG" \
--title "BMad Builder $TAG" \
--notes "$BODY" \
"${TAG}.sig" \
"${TAG}.pem" \
"${TAG}.sha"
Comment on lines +69 to +102
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Validate release notes before pushing the version commit and tag.

Right now, if the changelog entry is missing or malformed, Lines 93-96 fail only after Line 70 has already pushed main and the tag. Move release-note extraction before the push so failed validation does not leave a partial release state.

🛠️ Proposed fix
       - name: Capture new version
         id: version
         run: |
           VERSION=$(node -p "require('./package.json').version")
           echo "version=${VERSION}" >> $GITHUB_OUTPUT
           echo "tag=v${VERSION}" >> $GITHUB_OUTPUT
 
+      - name: Extract release notes
+        run: |
+          TAG="${{ steps.version.outputs.tag }}"
+          VERSION="${{ steps.version.outputs.version }}"
+          awk -v ver="$VERSION" '
+            /^## \[/ { if (found) exit; if (index($0, "## [" ver "]")) found=1; next }
+            found { print }
+          ' CHANGELOG.md > release-notes.md
+          if ! grep -q '[^[:space:]]' release-notes.md; then
+            echo "::error::No CHANGELOG.md entry found for $TAG. Add a '## [${VERSION}] - YYYY-MM-DD' section before releasing."
+            exit 1
+          fi
+
       - name: Push version commit and tag
         run: git push origin main --follow-tags
 
       - name: Install cosign
         uses: sigstore/cosign-installer@v3
@@
       - name: Create GitHub Release
         run: |
           TAG="${{ steps.version.outputs.tag }}"
-          VERSION="${{ steps.version.outputs.version }}"
-          BODY=$(awk -v ver="$VERSION" '
-            /^## \[/ { if (found) exit; if (index($0, "## [" ver "]")) found=1; next }
-            found { print }
-          ' CHANGELOG.md)
-          if [ -z "$BODY" ]; then
-            echo "::error::No CHANGELOG.md entry found for $TAG. Add a '## [${VERSION}] - YYYY-MM-DD' section before releasing."
-            exit 1
-          fi
           gh release create "$TAG" \
             --title "BMad Builder $TAG" \
-            --notes "$BODY" \
+            --notes-file release-notes.md \
             "${TAG}.sig" \
             "${TAG}.pem" \
             "${TAG}.sha"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/release.yaml around lines 69 - 102, Move the changelog
validation from the "Create GitHub Release" step to run before the "Push version
commit and tag" step: extract VERSION and TAG and run the BODY extraction logic
(the awk block that sets BODY from CHANGELOG.md using VERSION) and fail early if
BODY is empty so the workflow exits before executing the "Push version commit
and tag" step; update references to the TAG/VERSION variables so the same
extraction is used for both validation and later release creation, ensuring the
git push and tagging only occur after the check passes.

env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Notify Discord
if: success()
continue-on-error: true
run: |
set -o pipefail
source .github/scripts/discord-helpers.sh
[ -z "$WEBHOOK" ] && exit 0
TAG="${{ steps.version.outputs.tag }}"
RELEASE_URL="${{ github.server_url }}/${{ github.repository }}/releases/tag/${TAG}"
MSG=$(printf '🛠️ **[BMad Builder %s released](<%s>)**' "$TAG" "$RELEASE_URL" | esc)
Copy link
Copy Markdown

@augmentcode augmentcode Bot Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In .github/workflows/release.yaml:115, piping the formatted Markdown message through esc escapes *, [, and ], so the Discord post likely won’t render as bold text / a clickable link. This seems unintended given the message uses Markdown formatting.

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

jq -n --arg content "$MSG" '{content: $content}' | curl -sf --retry 2 -X POST "$WEBHOOK" -H "Content-Type: application/json" -d @-
env:
WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}

- name: Summary
run: |
TAG="${{ steps.version.outputs.tag }}"
SHA=$(git rev-parse "${TAG}")
{
echo "## Released ${TAG}"
echo ""
echo "- **GitHub Release:** https://github.com/${{ github.repository }}/releases/tag/${TAG}"
echo "- **Tag SHA (cosign-signed):** \`${SHA}\`"
echo "- **Signature artifacts:** \`${TAG}.sig\`, \`${TAG}.pem\`, \`${TAG}.sha\` attached to the release"
} >> $GITHUB_STEP_SUMMARY
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [1.7.0] - 2026-04-23

### 📚 Documentation

* **Customization authoring flow awareness** — `explanation/customization-for-authors.md` and `how-to/make-a-skill-customizable.md` now mention `bmad-customize`, the conversational authoring helper that walks users through scope selection, override writing, and merge verification. Guides authors to pick field names and defaults that read well in that flow, while preserving that hand-writing TOML still works for users who prefer it (#78)

## [1.6.0] - 2026-04-20

### 🎁 Features
Expand Down
7 changes: 1 addition & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,7 @@
"lint": "eslint . --ext .js,.cjs,.mjs,.yaml --max-warnings=0",
"lint:fix": "eslint . --ext .js,.cjs,.mjs,.yaml --fix",
"lint:md": "markdownlint-cli2 \"**/*.md\"",
"prepare": "husky || exit 0",
"test": "npm run test:schemas && npm run test:refs && npm run validate:schemas && npm run lint && npm run lint:md && npm run format:check",
"test:refs": "node test/test-validate-file-refs.cjs",
"test:schemas": "node test/test-agent-schema.js",
"validate:refs": "node tools/validate-file-refs.mjs",
"validate:schemas": "node test/validate-agent-schema.js"
"prepare": "husky || exit 0"
},
"lint-staged": {
"*.{js,cjs,mjs}": [
Expand Down
Loading