6767 echo "Running type checks..."
6868 pnpm typecheck
6969 pnpm -r typecheck || true
70-
70+
7171 echo "Running linting..."
7272 pnpm lint
7373 pnpm -r lint || true
@@ -78,21 +78,21 @@ jobs:
7878 # Configure git
7979 git config user.name "github-actions[bot]"
8080 git config user.email "github-actions[bot]@users.noreply.github.com"
81-
81+
8282 # Run changesets version with beta
8383 pnpm changeset version
84-
84+
8585 # Add beta suffix to all updated packages
8686 TIMESTAMP=$(date +%s)
87-
87+
8888 # Update main package if version changed
8989 if git diff --name-only | grep -q "^package.json$"; then
9090 CURRENT_VERSION=$(node -p "require('./package.json').version")
9191 BETA_VERSION="${CURRENT_VERSION}-beta.${TIMESTAMP}"
9292 npm version $BETA_VERSION --no-git-tag-version
9393 echo "Main package: $CURRENT_VERSION → $BETA_VERSION"
9494 fi
95-
95+
9696 # Update sub-packages if versions changed
9797 for pkg in packages/*/; do
9898 if [ -d "$pkg" ] && git diff --name-only | grep -q "^$pkg"; then
@@ -107,7 +107,7 @@ jobs:
107107 cd - > /dev/null
108108 fi
109109 done
110-
110+
111111 # Commit all changes
112112 git add -A
113113 git commit -m "chore: version packages for beta release" || echo "No changes to commit"
@@ -122,15 +122,15 @@ jobs:
122122 run : |
123123 # Publish with beta tag
124124 RELEASE_TAG=beta node scripts/release-packages.cjs
125-
125+
126126 # Collect published versions
127127 echo "published_versions<<EOF" >> $GITHUB_OUTPUT
128128 echo "### Published Beta Versions" >> $GITHUB_OUTPUT
129-
129+
130130 # Check main package
131131 MAIN_VERSION=$(node -p "require('./package.json').version")
132132 echo "- vue-pivottable@$MAIN_VERSION" >> $GITHUB_OUTPUT
133-
133+
134134 # Check sub-packages
135135 for pkg in packages/*/; do
136136 if [ -d "$pkg" ] && [ -f "$pkg/package.json" ]; then
@@ -153,7 +153,7 @@ jobs:
153153 id : check-pr
154154 run : |
155155 EXISTING_PR=$(gh pr list --base main --head staging --json number --jq '.[0].number' || echo "")
156-
156+
157157 if [ -n "$EXISTING_PR" ]; then
158158 echo "pr_exists=true" >> $GITHUB_OUTPUT
159159 echo "pr_number=$EXISTING_PR" >> $GITHUB_OUTPUT
@@ -168,42 +168,48 @@ jobs:
168168 run : |
169169 # Get the main package version for PR title
170170 MAIN_VERSION=$(node -p "require('./package.json').version")
171-
171+ PUBLISHED_VERSIONS="${{ steps.publish.outputs.published_versions }}"
172+
173+ # Create PR body file
174+ {
175+ echo "## 🎯 Beta Release Ready for Production"
176+ echo ""
177+ echo "$PUBLISHED_VERSIONS"
178+ echo ""
179+ echo "### 📋 What happens next?"
180+ echo "1. Review and test the beta versions"
181+ echo "2. When approved and merged, this will:"
182+ echo " - Update package.json versions (remove beta suffix)"
183+ echo " - Generate/update CHANGELOG.md files"
184+ echo " - Sync changes back to develop and staging"
185+ echo " - **Note**: npm publish happens only when you create a version tag"
186+ echo ""
187+ echo "### 🏷️ After merge:"
188+ echo "Create a version tag to trigger production release:"
189+ echo '```bash'
190+ echo "git checkout main"
191+ echo "git pull origin main"
192+ echo "git tag v\${VERSION}"
193+ echo "git push origin v\${VERSION}"
194+ echo '```'
195+ echo ""
196+ echo "### 📦 Install beta versions:"
197+ echo '```bash'
198+ echo "npm install vue-pivottable@beta"
199+ echo "# or specific sub-packages"
200+ echo "npm install @vue-pivottable/plotly-renderer@beta"
201+ echo "npm install @vue-pivottable/lazy-table-renderer@beta"
202+ echo '```'
203+ echo ""
204+ echo "---"
205+ echo "*This PR was automatically created by the staging release workflow*"
206+ } > pr-body.md
207+
172208 gh pr create \
173209 --base main \
174210 --head staging \
175211 --title "🚀 Release: Beta versions ready for production" \
176- --body "## 🎯 Beta Release Ready for Production
177-
178- ${{ steps.publish.outputs.published_versions }}
179-
180- # ## 📋 What happens next?
181- 1. Review and test the beta versions
182- 2. When approved and merged, this will :
183- - Update package.json versions (remove beta suffix)
184- - Generate/update CHANGELOG.md files
185- - Sync changes back to develop and staging
186- - **Note**: npm publish happens only when you create a version tag
187-
188- # ## 🏷️ After merge:
189- Create a version tag to trigger production release :
190- \`\`\`bash
191- git checkout main
192- git pull origin main
193- git tag v\${VERSION}
194- git push origin v\${VERSION}
195- \`\`\`
196-
197- # ## 📦 Install beta versions:
198- \`\`\`bash
199- npm install vue-pivottable@beta
200- # or specific sub-packages
201- npm install @vue-pivottable/plotly-renderer@beta
202- npm install @vue-pivottable/lazy-table-renderer@beta
203- \`\`\`
204-
205- ---
206- *This PR was automatically created by the staging release workflow*" \
212+ --body-file pr-body.md \
207213 --label "released" \
208214 --label "auto-updated"
209215 env :
@@ -215,46 +221,47 @@ npm install @vue-pivottable/lazy-table-renderer@beta
215221 TIMESTAMP=$(date -u +"%Y-%m-%d %H:%M:%S UTC")
216222 PR_NUMBER="${{ steps.check-pr.outputs.pr_number }}"
217223 PUBLISHED_VERSIONS="${{ steps.publish.outputs.published_versions }}"
218-
219- cat > pr-body-update.md << EOF
220- # # 🎯 Beta Release Ready for Production
221224
222- # ## ⏰ Last Updated: $TIMESTAMP
225+ # Create updated PR body
226+ {
227+ echo "## 🎯 Beta Release Ready for Production"
228+ echo ""
229+ echo "### ⏰ Last Updated: $TIMESTAMP"
230+ echo ""
231+ echo "$PUBLISHED_VERSIONS"
232+ echo ""
233+ echo "### 📋 What happens next?"
234+ echo "1. Review and test the beta versions"
235+ echo "2. When approved and merged, this will:"
236+ echo " - Update package.json versions (remove beta suffix)"
237+ echo " - Generate/update CHANGELOG.md files"
238+ echo " - Sync changes back to develop and staging"
239+ echo " - **Note**: npm publish happens only when you create a version tag"
240+ echo ""
241+ echo "### 🏷️ After merge:"
242+ echo "Create a version tag to trigger production release:"
243+ echo '```bash'
244+ echo "git checkout main"
245+ echo "git pull origin main"
246+ echo "git tag v\${VERSION}"
247+ echo "git push origin v\${VERSION}"
248+ echo '```'
249+ echo ""
250+ echo "### 📦 Install beta versions:"
251+ echo '```bash'
252+ echo "npm install vue-pivottable@beta"
253+ echo "# or specific sub-packages"
254+ echo "npm install @vue-pivottable/plotly-renderer@beta"
255+ echo "npm install @vue-pivottable/lazy-table-renderer@beta"
256+ echo '```'
257+ echo ""
258+ echo "---"
259+ echo "*This PR was automatically updated by the staging release workflow*"
260+ } > pr-body-update.md
223261
224- $PUBLISHED_VERSIONS
225-
226- # ## 📋 What happens next?
227- 1. Review and test the beta versions
228- 2. When approved and merged, this will :
229- - Update package.json versions (remove beta suffix)
230- - Generate/update CHANGELOG.md files
231- - Sync changes back to develop and staging
232- - **Note**: npm publish happens only when you create a version tag
233-
234- # ## 🏷️ After merge:
235- Create a version tag to trigger production release :
236- \`\`\`bash
237- git checkout main
238- git pull origin main
239- git tag v\${VERSION}
240- git push origin v\${VERSION}
241- \`\`\`
242-
243- # ## 📦 Install beta versions:
244- \`\`\`bash
245- npm install vue-pivottable@beta
246- # or specific sub-packages
247- npm install @vue-pivottable/plotly-renderer@beta
248- npm install @vue-pivottable/lazy-table-renderer@beta
249- \`\`\`
250-
251- ---
252- *This PR was automatically updated by the staging release workflow*
253- EOF
254-
255262 # Update PR body with new beta versions
256263 gh pr edit $PR_NUMBER --body-file pr-body-update.md
257-
264+
258265 # Update labels
259266 gh pr edit $PR_NUMBER \
260267 --add-label "needs-review"
0 commit comments