Skip to content

Commit b54df45

Browse files
committed
fix: resolve all YAML syntax errors in workflow files
- Fixed heredoc syntax issues in release-staging.yml and release-tag.yml - Replaced problematic heredoc blocks with echo commands in braces - Added missing newline at end of pr-check.yml - Removed all trailing spaces from workflow files - All workflows now pass yamllint validation without errors
1 parent 1227231 commit b54df45

File tree

5 files changed

+167
-159
lines changed

5 files changed

+167
-159
lines changed

.github/workflows/integrate-develop.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
id: check-pr
3232
run: |
3333
EXISTING_PR=$(gh pr list --base staging --head develop --json number --jq '.[0].number' || echo "")
34-
34+
3535
if [ -n "$EXISTING_PR" ]; then
3636
echo "pr_exists=true" >> $GITHUB_OUTPUT
3737
echo "pr_number=$EXISTING_PR" >> $GITHUB_OUTPUT
@@ -48,7 +48,7 @@ jobs:
4848
run: |
4949
# Fetch staging branch
5050
git fetch origin staging:staging || echo "Staging branch not found"
51-
51+
5252
# Get the latest commits from develop that aren't in staging
5353
if git rev-parse --verify origin/staging >/dev/null 2>&1; then
5454
COMMITS=$(git log --pretty=format:"- %s (%h)" origin/staging..HEAD | head -20)
@@ -57,17 +57,17 @@ jobs:
5757
COMMITS=$(git log --pretty=format:"- %s (%h)" HEAD | head -20)
5858
COMMIT_COUNT=$(git rev-list --count HEAD)
5959
fi
60-
60+
6161
# Escape for GitHub Actions output
6262
COMMITS="${COMMITS//'%'/'%25'}"
6363
COMMITS="${COMMITS//$'\n'/'%0A'}"
6464
COMMITS="${COMMITS//$'\r'/'%0D'}"
65-
65+
6666
echo "commits<<EOF" >> $GITHUB_OUTPUT
6767
echo "$COMMITS" >> $GITHUB_OUTPUT
6868
echo "EOF" >> $GITHUB_OUTPUT
6969
echo "commit_count=$COMMIT_COUNT" >> $GITHUB_OUTPUT
70-
70+
7171
# Get timestamp
7272
TIMESTAMP=$(date -u +"%Y-%m-%d %H:%M:%S UTC")
7373
echo "timestamp=$TIMESTAMP" >> $GITHUB_OUTPUT
@@ -77,7 +77,7 @@ jobs:
7777
run: |
7878
COMMIT_COUNT="${{ steps.commit-info.outputs.commit_count }}"
7979
TIMESTAMP="${{ steps.commit-info.outputs.timestamp }}"
80-
80+
8181
# Create PR body file
8282
{
8383
echo "## 🚀 Integration from develop to staging"
@@ -103,7 +103,7 @@ jobs:
103103
echo "- Multiple features can accumulate in this single PR"
104104
echo "- Approval triggers the beta release process"
105105
} > pr-body.md
106-
106+
107107
gh pr create \
108108
--base staging \
109109
--head develop \
@@ -120,17 +120,17 @@ jobs:
120120
COMMIT_COUNT="${{ steps.commit-info.outputs.commit_count }}"
121121
TIMESTAMP="${{ steps.commit-info.outputs.timestamp }}"
122122
COMMITS="${{ steps.commit-info.outputs.commits }}"
123-
123+
124124
# Update PR title with commit count
125125
gh pr edit $PR_NUMBER \
126126
--title "🔄 Integrate develop → staging (${COMMIT_COUNT} commits)"
127-
127+
128128
# Get current PR body
129129
CURRENT_BODY=$(gh pr view $PR_NUMBER --json body --jq '.body')
130-
130+
131131
# Create updated section
132132
UPDATED_SECTION="### 🔄 Last Updated: ${TIMESTAMP}\nNew commits: ${COMMIT_COUNT}\n\n### 📝 Recent Commits\n${COMMITS}"
133-
133+
134134
# Update or append the updated section
135135
if echo "$CURRENT_BODY" | grep -q "### 🔄 Last Updated:"; then
136136
# Replace existing update section
@@ -140,18 +140,18 @@ jobs:
140140
# Append update section
141141
NEW_BODY="$CURRENT_BODY\n\n---\n\n$UPDATED_SECTION"
142142
fi
143-
143+
144144
# Update PR body
145145
echo "$NEW_BODY" > pr-body-update.md
146146
gh pr edit $PR_NUMBER --body-file pr-body-update.md
147-
147+
148148
# Add labels
149149
gh pr edit $PR_NUMBER \
150150
--add-label "needs-review"
151-
151+
152152
# Set as ready for review
153153
gh pr ready $PR_NUMBER || true
154-
154+
155155
echo "✅ Updated PR #${PR_NUMBER} with ${COMMIT_COUNT} new commits"
156156
env:
157157
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/pr-check.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
echo "❌ Main package build output not found"
8383
exit 1
8484
fi
85-
85+
8686
# Check sub-packages
8787
for pkg in packages/*/; do
8888
if [ -d "$pkg" ] && [ -f "$pkg/package.json" ]; then
@@ -92,5 +92,5 @@ jobs:
9292
fi
9393
fi
9494
done
95-
96-
echo "✅ All packages built successfully"
95+
96+
echo "✅ All packages built successfully"

.github/workflows/release-staging.yml

Lines changed: 85 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
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

Comments
 (0)