Skip to content
Merged
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
8 changes: 6 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,18 +100,22 @@ jobs:
# ─── 3. Sync workspace version ──────────────────────────────────────────────
# semantic-release only bumps the plugin package.json (pkgRoot).
# This step syncs the version to the root workspace package.json for consistency.
# Creates a PR since main is protected.
- name: Sync workspace version
if: success()
run: |
PLUGIN_VERSION=$(cat packages/vite-plugin-flatwave-react/package.json | grep '"version"' | head -1 | sed 's/.*"version": "\(.*\)".*/\1/')
echo "Plugin version: $PLUGIN_VERSION"
# Update root package.json
npm pkg set version=$PLUGIN_VERSION --workspaces=false
# Commit and push the version sync (chore commit won't trigger new release)
# Create a branch and PR for the version sync (chore commit won't trigger new release)
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
BRANCH_NAME="chore/sync-workspace-version-$PLUGIN_VERSION"
git checkout -b "$BRANCH_NAME"
git add package.json
git commit -m "chore: sync workspace version to $PLUGIN_VERSION" || echo "No changes to commit"
git push origin HEAD:main
git push origin "$BRANCH_NAME"
gh pr create --base main --head "$BRANCH_NAME" --title "chore: sync workspace version to $PLUGIN_VERSION" --body "Automated version sync after release v$PLUGIN_VERSION" --label "automated" || echo "PR may already exist"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading