Skip to content

Commit fad2ac6

Browse files
committed
fix: resolve multi-line string issues in all workflows
- Fixed integrate-develop.yml: Use here-doc for PR body - Fixed release-staging.yml: Use here-doc for PR body - Fixed update-version.yml: Use here-doc for PR bodies - Fixed release-tag.yml: Use here-doc for release notes All workflows now properly handle multi-line strings with GitHub Actions expressions
1 parent 7b2d90b commit fad2ac6

File tree

4 files changed

+61
-33
lines changed

4 files changed

+61
-33
lines changed

.github/workflows/integrate-develop.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,8 @@ jobs:
7979
TIMESTAMP="${{ steps.commit-info.outputs.timestamp }}"
8080
COMMITS="${{ steps.commit-info.outputs.commits }}"
8181
82-
gh pr create \
83-
--base staging \
84-
--head develop \
85-
--title "🔄 Integrate develop → staging" \
86-
--body "## 🚀 Integration from develop to staging
82+
cat > pr-body.md << EOF
83+
## 🚀 Integration from develop to staging
8784

8885
### 📊 Summary
8986
- **Commits**: ${COMMIT_COUNT} new commits
@@ -104,7 +101,14 @@ ${COMMITS}
104101
### ⚡ Notes
105102
- This PR will be automatically updated with new commits to develop
106103
- Multiple features can accumulate in this single PR
107-
- Approval triggers the beta release process" \
104+
- Approval triggers the beta release process
105+
EOF
106+
107+
gh pr create \
108+
--base staging \
109+
--head develop \
110+
--title "🔄 Integrate develop → staging" \
111+
--body-file pr-body.md \
108112
--label "integration" \
109113
--label "automated"
110114
env:
@@ -149,7 +153,8 @@ $UPDATED_SECTION"
149153
fi
150154

151155
# Update PR body
152-
gh pr edit $PR_NUMBER --body "$NEW_BODY"
156+
echo "$NEW_BODY" > pr-body-update.md
157+
gh pr edit $PR_NUMBER --body-file pr-body-update.md
153158

154159
# Add labels
155160
gh pr edit $PR_NUMBER \

.github/workflows/release-staging.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -214,14 +214,15 @@ npm install @vue-pivottable/lazy-table-renderer@beta
214214
if: steps.check-pr.outputs.pr_exists == 'true'
215215
run: |
216216
TIMESTAMP=$(date -u +"%Y-%m-%d %H:%M:%S UTC")
217+
PR_NUMBER="${{ steps.check-pr.outputs.pr_number }}"
218+
PUBLISHED_VERSIONS="${{ steps.publish.outputs.published_versions }}"
217219
218-
# Update PR body with new beta versions
219-
gh pr edit ${{ steps.check-pr.outputs.pr_number }} \
220-
--body "## 🎯 Beta Release Ready for Production
220+
cat > pr-body-update.md << EOF
221+
## 🎯 Beta Release Ready for Production
221222

222223
### ⏰ Last Updated: $TIMESTAMP
223224

224-
${{ steps.publish.outputs.published_versions }}
225+
$PUBLISHED_VERSIONS
225226

226227
### 📋 What happens next?
227228
1. Review and test the beta versions
@@ -249,10 +250,14 @@ npm install @vue-pivottable/lazy-table-renderer@beta
249250
\`\`\`
250251

251252
---
252-
*This PR was automatically updated by the staging release workflow*"
253+
*This PR was automatically updated by the staging release workflow*
254+
EOF
255+
256+
# Update PR body with new beta versions
257+
gh pr edit $PR_NUMBER --body-file pr-body-update.md
253258

254259
# Update labels
255-
gh pr edit ${{ steps.check-pr.outputs.pr_number }} \
260+
gh pr edit $PR_NUMBER \
256261
--add-label "auto-updated" \
257262
--add-label "needs-review"
258263
env:

.github/workflows/release-tag.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,16 +137,17 @@ jobs:
137137
run: |
138138
TAG="${{ steps.tag-info.outputs.tag }}"
139139
VERSION="${{ steps.tag-info.outputs.version }}"
140+
PUBLISHED_PACKAGES="${{ steps.publish.outputs.published_packages }}"
141+
RELEASE_NOTES="${{ steps.release-notes.outputs.notes }}"
140142
141-
gh release create "$TAG" \
142-
--title "Release $TAG" \
143-
--notes "## 🚀 Production Release $VERSION
143+
cat > release-notes.md << EOF
144+
## 🚀 Production Release $VERSION
144145

145146
### 📦 Published Packages
146-
${{ steps.publish.outputs.published_packages }}
147+
$PUBLISHED_PACKAGES
147148

148149
### 📝 Release Notes
149-
${{ steps.release-notes.outputs.notes }}
150+
$RELEASE_NOTES
150151

151152
### 💻 Installation
152153
\`\`\`bash
@@ -162,7 +163,12 @@ npm install @vue-pivottable/lazy-table-renderer@latest
162163
- [npm: @vue-pivottable/lazy-table-renderer](https://www.npmjs.com/package/@vue-pivottable/lazy-table-renderer)
163164

164165
---
165-
*Released by GitHub Actions*"
166+
*Released by GitHub Actions*
167+
EOF
168+
169+
gh release create "$TAG" \
170+
--title "Release $TAG" \
171+
--notes-file release-notes.md
166172
env:
167173
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
168174

.github/workflows/update-version.yml

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -152,22 +152,28 @@ jobs:
152152
git push origin $SYNC_BRANCH
153153
154154
# Create PR
155-
gh pr create \
156-
--base develop \
157-
--head $SYNC_BRANCH \
158-
--title "🔄 Sync: main → develop (v${{ steps.version-update.outputs.version }})" \
159-
--body "## 🔄 Version Sync from Main
155+
VERSION="${{ steps.version-update.outputs.version }}"
156+
157+
cat > pr-body.md << EOF
158+
## 🔄 Version Sync from Main
160159

161160
### 📦 Updated Versions
162161
This PR syncs the stable version updates from main to develop.
163162

164-
Version: **v${{ steps.version-update.outputs.version }}**
163+
Version: **v$VERSION**
165164

166165
### ⚡ Auto-merge
167166
This PR should be merged automatically to keep branches in sync.
168167

169168
---
170-
*This PR was automatically created by the version update workflow*" \
169+
*This PR was automatically created by the version update workflow*
170+
EOF
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 \
171177
--label "sync" \
172178
--label "automated"
173179
env:
@@ -194,22 +200,28 @@ This PR should be merged automatically to keep branches in sync.
194200
git push origin $SYNC_BRANCH
195201
196202
# Create PR
197-
gh pr create \
198-
--base staging \
199-
--head $SYNC_BRANCH \
200-
--title "🔄 Sync: main → staging (v${{ steps.version-update.outputs.version }})" \
201-
--body "## 🔄 Version Sync from Main
203+
VERSION="${{ steps.version-update.outputs.version }}"
204+
205+
cat > pr-body-staging.md << EOF
206+
## 🔄 Version Sync from Main
202207

203208
### 📦 Updated Versions
204209
This PR syncs the stable version updates from main to staging.
205210

206-
Version: **v${{ steps.version-update.outputs.version }}**
211+
Version: **v$VERSION**
207212

208213
### ⚡ Auto-merge
209214
This PR should be merged automatically to keep branches in sync.
210215

211216
---
212-
*This PR was automatically created by the version update workflow*" \
217+
*This PR was automatically created by the version update workflow*
218+
EOF
219+
220+
gh pr create \
221+
--base staging \
222+
--head $SYNC_BRANCH \
223+
--title "🔄 Sync: main → staging (v$VERSION)" \
224+
--body-file pr-body-staging.md \
213225
--label "sync" \
214226
--label "automated"
215227
env:

0 commit comments

Comments
 (0)