Compare commits
1 Commits
fix/promot
...
v5.1.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cfcda760a5 |
34
.github/workflows/promote-to-stable.yml
vendored
34
.github/workflows/promote-to-stable.yml
vendored
@@ -19,15 +19,13 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
actions: write
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
token: ${{ secrets.PAT_TOKEN || secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
persist-credentials: true
|
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
@@ -75,8 +73,8 @@ jobs:
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Check if calculated version already exists (either as NPM package or git tag)
|
# Check if calculated version already exists on NPM and increment if necessary
|
||||||
while npm view bmad-method@$NEW_VERSION version >/dev/null 2>&1 || git ls-remote --tags origin | grep -q "refs/tags/v$NEW_VERSION"; do
|
while npm view bmad-method@$NEW_VERSION version >/dev/null 2>&1; do
|
||||||
echo "Version $NEW_VERSION already exists, incrementing..."
|
echo "Version $NEW_VERSION already exists, incrementing..."
|
||||||
IFS='.' read -ra NEW_VERSION_PARTS <<< "$NEW_VERSION"
|
IFS='.' read -ra NEW_VERSION_PARTS <<< "$NEW_VERSION"
|
||||||
NEW_MAJOR=${NEW_VERSION_PARTS[0]}
|
NEW_MAJOR=${NEW_VERSION_PARTS[0]}
|
||||||
@@ -117,36 +115,12 @@ jobs:
|
|||||||
|
|
||||||
- name: Create and push stable tag
|
- name: Create and push stable tag
|
||||||
run: |
|
run: |
|
||||||
# Create new tag (version check already ensures it doesn't exist)
|
|
||||||
git tag -a "v${{ steps.version.outputs.new_version }}" -m "Stable release v${{ steps.version.outputs.new_version }}"
|
git tag -a "v${{ steps.version.outputs.new_version }}" -m "Stable release v${{ steps.version.outputs.new_version }}"
|
||||||
|
|
||||||
# Push the new tag
|
|
||||||
git push origin "v${{ steps.version.outputs.new_version }}"
|
git push origin "v${{ steps.version.outputs.new_version }}"
|
||||||
|
|
||||||
- name: Push changes to main
|
- name: Push changes to main
|
||||||
run: |
|
run: |
|
||||||
# Try direct push first (works if user has PAT_TOKEN with admin rights)
|
git push origin HEAD:main
|
||||||
if git push origin HEAD:main 2>/dev/null; then
|
|
||||||
echo "✅ Successfully pushed to main branch"
|
|
||||||
else
|
|
||||||
echo "⚠️ Direct push failed (protected branch). Creating a pull request instead..."
|
|
||||||
|
|
||||||
# Create a new branch for the changes
|
|
||||||
BRANCH_NAME="auto/promote-stable-${{ steps.version.outputs.new_version }}"
|
|
||||||
git checkout -b "$BRANCH_NAME"
|
|
||||||
git push -u origin "$BRANCH_NAME"
|
|
||||||
|
|
||||||
# Create PR using GitHub CLI
|
|
||||||
gh pr create \
|
|
||||||
--title "🚀 Auto: Promote to stable v${{ steps.version.outputs.new_version }}" \
|
|
||||||
--body "Automated promotion to stable version ${{ steps.version.outputs.new_version }}" \
|
|
||||||
--base main \
|
|
||||||
--head "$BRANCH_NAME"
|
|
||||||
|
|
||||||
echo "📝 Pull request created for stable promotion"
|
|
||||||
fi
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN || secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Publish to NPM with stable tag
|
- name: Publish to NPM with stable tag
|
||||||
env:
|
env:
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "bmad-method",
|
"name": "bmad-method",
|
||||||
"version": "5.0.0",
|
"version": "5.1.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "bmad-method",
|
"name": "bmad-method",
|
||||||
"version": "5.0.0",
|
"version": "5.1.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@kayvan/markdown-tree-parser": "^1.5.0",
|
"@kayvan/markdown-tree-parser": "^1.5.0",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "bmad-method",
|
"name": "bmad-method",
|
||||||
"version": "5.0.0",
|
"version": "5.1.0",
|
||||||
"description": "Breakthrough Method of Agile AI-driven Development",
|
"description": "Breakthrough Method of Agile AI-driven Development",
|
||||||
"main": "tools/cli.js",
|
"main": "tools/cli.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "bmad-method",
|
"name": "bmad-method",
|
||||||
"version": "5.0.0",
|
"version": "5.1.0",
|
||||||
"description": "BMad Method installer - AI-powered Agile development framework",
|
"description": "BMad Method installer - AI-powered Agile development framework",
|
||||||
"main": "lib/installer.js",
|
"main": "lib/installer.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
|||||||
Reference in New Issue
Block a user