Skip to content

Commit 3766d01

Browse files
authored
chore: remove automated release notes
will add in follow up
1 parent 0366968 commit 3766d01

File tree

1 file changed

+0
-91
lines changed

1 file changed

+0
-91
lines changed

.github/workflows/release.yml

-91
Original file line numberDiff line numberDiff line change
@@ -168,94 +168,3 @@ jobs:
168168
echo "DEV_RPC=https://virtual.gnosis.rpc.tenderly.co/78ca845d-2b24-44a6-9ce2-869a979e8b5b" >> .env
169169
echo "FORK_URL=https://virtual.gnosis.rpc.tenderly.co/78ca845d-2b24-44a6-9ce2-869a979e8b5b" >> .env
170170
node build.js
171-
172-
update-release:
173-
name: Update Release Notes
174-
runs-on: ubuntu-latest
175-
needs: build-release
176-
177-
steps:
178-
- uses: actions/checkout@v3
179-
180-
# Get the latest release matching the pushed tag (created by electron-builder)
181-
- name: Get release by tag
182-
id: release
183-
uses: actions/github-script@v6
184-
with:
185-
script: |
186-
const release = await github.repos.getReleaseByTag({
187-
owner: context.repo.owner,
188-
repo: context.repo.repo,
189-
tag: context.ref.replace('refs/tags/', '')
190-
});
191-
return release.data.id;
192-
193-
# Get the latest published release
194-
- name: Get latest release tag
195-
id: latest_release
196-
uses: actions/github-script@v6
197-
with:
198-
script: |
199-
const latestRelease = await github.repos.getLatestRelease({
200-
owner: context.repo.owner,
201-
repo: context.repo.repo
202-
});
203-
return latestRelease.data.tag_name;
204-
205-
# Get list of merged PRs and format release notes
206-
- name: Generate changelog
207-
id: changelog
208-
uses: actions/github-script@v6
209-
with:
210-
script: |
211-
const latestReleaseTag = '${{ steps.latest_release.outputs.result }}';
212-
const currentTag = github.context.ref.replace('refs/tags/', '');
213-
214-
// Get commits between the latest release and the current tag
215-
const { data: compareData } = await github.repos.compareCommits({
216-
owner: context.repo.owner,
217-
repo: context.repo.repo,
218-
base: latestReleaseTag,
219-
head: currentTag
220-
});
221-
222-
// Filter merged PRs based on commit messages
223-
const prs = new Map(); // To avoid duplicates
224-
225-
for (const commit of compareData.commits) {
226-
const { data: prData } = await github.search.issuesAndPullRequests({
227-
q: `${commit.sha} repo:${context.repo.owner}/${context.repo.repo}`
228-
});
229-
230-
// If PR found, format and store it
231-
if (prData.items.length > 0) {
232-
const pr = prData.items[0];
233-
prs.set(pr.number, pr);
234-
}
235-
}
236-
237-
// Format the PRs into the "What's Changed" section
238-
let changelog = `## What's Changed\n`;
239-
for (const [prNumber, pr] of prs) {
240-
changelog += `* ${pr.title} by @${pr.user.login} in ${pr.html_url}\n`;
241-
}
242-
243-
// Add the full changelog link
244-
changelog += `\n**Full Changelog**: https://github.com/${context.repo.owner}/${context.repo.repo}/compare/${latestReleaseTag}...${currentTag}`;
245-
246-
return changelog;
247-
248-
# Update the release description and set it to draft mode
249-
- name: Update release description
250-
uses: actions/github-script@v6
251-
with:
252-
script: |
253-
const release_id = ${{ steps.release.outputs.result }};
254-
const changelog = ${{ steps.changelog.outputs.result }};
255-
await github.repos.updateRelease({
256-
owner: context.repo.owner,
257-
repo: context.repo.repo,
258-
release_id: release_id,
259-
body: changelog,
260-
draft: true // Keep the release as draft
261-
});

0 commit comments

Comments
 (0)