Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 20 additions & 3 deletions .github/workflows/create-tag-on-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
with:
node-version-file: .nvmrc

- name: Create and push new tag
run: npm run create-tag
# - name: Create and push new tag
# run: npm run create-tag

- name: Get latest commit
id: get-commit
Expand All @@ -40,6 +40,21 @@ jobs:
if (prs?.length > 0) {
const pull_number = prs[0].number;
const { data: pr } = await github.rest.pulls.get({ owner, repo, pull_number });

// Extract only the Purpose section from PR description
let releaseNote = 'No description provided';
if (pr.body) {
const purposeMatch = pr.body.match(/Purpose:\s*(.+?)(?:\n|Main changes:|$)/s);
Comment thread
MishaKav marked this conversation as resolved.
Outdated

if (purposeMatch) {
releaseNote = purposeMatch[1].trim();
}
}

core.setOutput('pr-title', pr.title);
core.setOutput('release-note', releaseNote);
core.setOutput('pr-number', pr.number);

return pr.labels.some(label => label.name.includes('auto-deploy'));
}
return false;
Expand All @@ -49,6 +64,8 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create $NEW_TAG --generate-notes
RELEASE_NOTE="${{ steps.should-deploy.outputs.release-note }}"

Comment thread
MishaKav marked this conversation as resolved.
Comment thread
MishaKav marked this conversation as resolved.
gh release create $NEW_TAG --notes "$RELEASE_NOTE"
git checkout $NEW_TAG
npm run update-v2-tag