Skip to content

Commit 6d16879

Browse files
authored
Merge pull request #280 from vue-pivottable/staging
Staging
2 parents 6dc83b7 + e73f635 commit 6d16879

File tree

3 files changed

+25
-70
lines changed

3 files changed

+25
-70
lines changed

.github/workflows/integrate-develop.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
create-or-update-pr:
1414
name: Create or Update PR to Staging
1515
runs-on: ubuntu-latest
16+
# Skip if this is a sync commit from main
17+
if: "!contains(github.event.head_commit.message, 'chore: sync version updates from main')"
1618
permissions:
1719
contents: write
1820
pull-requests: write
@@ -128,8 +130,16 @@ jobs:
128130
# Get current PR body
129131
CURRENT_BODY=$(gh pr view $PR_NUMBER --json body --jq '.body')
130132
131-
# Create updated section
132-
UPDATED_SECTION="### 🔄 Last Updated: ${TIMESTAMP}\nNew commits: ${COMMIT_COUNT}\n\n### 📝 Recent Commits\n${COMMITS}"
133+
# Create updated section safely using echo commands
134+
{
135+
echo "### 🔄 Last Updated: ${TIMESTAMP}"
136+
echo "New commits: ${COMMIT_COUNT}"
137+
echo ""
138+
echo "### 📝 Recent Commits"
139+
echo "${COMMITS}" | sed 's/%0A/\n/g; s/%0D//g; s/%25/%/g'
140+
} > updated-section.md
141+
142+
UPDATED_SECTION=$(cat updated-section.md)
133143
134144
# Update or append the updated section
135145
if echo "$CURRENT_BODY" | grep -q "### 🔄 Last Updated:"; then

.github/workflows/pr-check.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ jobs:
4747
if [ -n "$(ls -A .changeset/*.md 2>/dev/null | grep -v README.md)" ]; then
4848
echo "✅ Changeset found"
4949
else
50-
echo "⚠️ No changeset found. Please add a changeset with 'pnpm changeset add'"
51-
echo " This is required for all changes that affect published packages."
52-
exit 1
50+
echo "⚠️ No changeset found. Consider adding a changeset with 'pnpm changeset add'"
51+
echo " Changesets are recommended for changes that affect published packages."
52+
echo " (Not required for documentation, CI/CD, or other non-package changes)"
5353
fi
5454
5555
build:

.github/workflows/update-version.yml

Lines changed: 10 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -138,90 +138,35 @@ jobs:
138138
run: |
139139
echo "🔄 Syncing changes to develop branch..."
140140
141-
# Fetch latest develop
141+
# Fetch and checkout develop
142142
git fetch origin develop:develop
143-
144-
# Create sync branch
145-
SYNC_BRANCH="sync/main-to-develop-$(date +%s)"
146-
git checkout -b $SYNC_BRANCH
143+
git checkout develop
147144
148145
# Merge main changes
149146
git merge main --no-ff -m "chore: sync version updates from main"
150147
151-
# Push sync branch
152-
git push origin $SYNC_BRANCH
153-
154-
# Create PR
155-
VERSION="${{ steps.version-update.outputs.version }}"
148+
# Push directly to develop
149+
git push origin develop
156150
157-
{
158-
echo "## 🔄 Version Sync from Main"
159-
echo ""
160-
echo "### 📦 Updated Versions"
161-
echo "This PR syncs the stable version updates from main to develop."
162-
echo ""
163-
echo "Version: **v$VERSION**"
164-
echo ""
165-
echo "### ⚡ Auto-merge"
166-
echo "This PR should be merged automatically to keep branches in sync."
167-
echo ""
168-
echo "---"
169-
echo "*This PR was automatically created by the version update workflow*"
170-
} > pr-body.md
171-
172-
gh pr create \
173-
--base develop \
174-
--head $SYNC_BRANCH \
175-
--title "🔄 Sync: main → develop (v$VERSION)" \
176-
--body-file pr-body.md \
177-
--label "auto-updated"
151+
echo "✅ Successfully synced main to develop"
178152
env:
179153
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
180154

181155
- name: Sync to staging
182156
run: |
183157
echo "🔄 Syncing changes to staging branch..."
184158
185-
# Checkout main again
186-
git checkout main
187-
188-
# Fetch latest staging
159+
# Fetch and checkout staging
189160
git fetch origin staging:staging
190-
191-
# Create sync branch
192-
SYNC_BRANCH="sync/main-to-staging-$(date +%s)"
193-
git checkout -b $SYNC_BRANCH
161+
git checkout staging
194162
195163
# Merge main changes
196164
git merge main --no-ff -m "chore: sync version updates from main"
197165
198-
# Push sync branch
199-
git push origin $SYNC_BRANCH
200-
201-
# Create PR
202-
VERSION="${{ steps.version-update.outputs.version }}"
166+
# Push directly to staging
167+
git push origin staging
203168
204-
{
205-
echo "## 🔄 Version Sync from Main"
206-
echo ""
207-
echo "### 📦 Updated Versions"
208-
echo "This PR syncs the stable version updates from main to staging."
209-
echo ""
210-
echo "Version: **v$VERSION**"
211-
echo ""
212-
echo "### ⚡ Auto-merge"
213-
echo "This PR should be merged automatically to keep branches in sync."
214-
echo ""
215-
echo "---"
216-
echo "*This PR was automatically created by the version update workflow*"
217-
} > pr-body-staging.md
218-
219-
gh pr create \
220-
--base staging \
221-
--head $SYNC_BRANCH \
222-
--title "🔄 Sync: main → staging (v$VERSION)" \
223-
--body-file pr-body-staging.md \
224-
--label "auto-updated"
169+
echo "✅ Successfully synced main to staging"
225170
env:
226171
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
227172

0 commit comments

Comments
 (0)