File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change 4040 if (prs?.length > 0) {
4141 const pull_number = prs[0].number;
4242 const { data: pr } = await github.rest.pulls.get({ owner, repo, pull_number });
43+
44+ // Extract only the Purpose section from PR description
45+ let releaseNote = 'No description provided';
46+ if (pr.body) {
47+ const purposeMatch = pr.body.match(/Purpose:\s*(.+?)(?:\n|Main changes:|$)/s);
48+
49+ if (purposeMatch) {
50+ releaseNote = purposeMatch[1].trim();
51+ }
52+ }
53+
54+ core.setOutput('pr-title', pr.title);
55+ core.setOutput('release-note', releaseNote);
56+ core.setOutput('pr-number', pr.number);
57+
4358 return pr.labels.some(label => label.name.includes('auto-deploy'));
4459 }
4560 return false;
4964 env :
5065 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5166 run : |
52- gh release create $NEW_TAG --generate-notes
67+ RELEASE_NOTE="${{ steps.should-deploy.outputs.release-note }}"
68+
69+ gh release create $NEW_TAG --notes "$RELEASE_NOTE"
5370 git checkout $NEW_TAG
5471 npm run update-v2-tag
You can’t perform that action at this time.
0 commit comments