mirror of
https://github.com/bluenviron/mediamtx
synced 2025-02-13 09:58:50 +00:00
update release workflow
This commit is contained in:
parent
a8d1f91646
commit
7fd749cf0e
20
.github/workflows/release.yml
vendored
20
.github/workflows/release.yml
vendored
@ -23,29 +23,11 @@ jobs:
|
||||
|
||||
const currentRelease = context.ref.split('/')[2];
|
||||
|
||||
let res = await github.rest.repos.getLatestRelease({
|
||||
owner,
|
||||
repo,
|
||||
});
|
||||
const previousRelease = res.data['tag_name'];
|
||||
|
||||
res = await github.rest.repos.compareCommitsWithBasehead({
|
||||
owner,
|
||||
repo,
|
||||
basehead: `${previousRelease}...${currentRelease}`,
|
||||
});
|
||||
|
||||
const messages = [];
|
||||
for (const commit of res.data.commits) {
|
||||
messages.push(`* ${commit.commit.message} ${commit.html_url}`);
|
||||
}
|
||||
|
||||
res = await github.rest.repos.createRelease({
|
||||
const res = await github.rest.repos.createRelease({
|
||||
owner,
|
||||
repo,
|
||||
tag_name: currentRelease,
|
||||
name: currentRelease,
|
||||
body: `Commits:\n${messages.join('\n')}\n`,
|
||||
});
|
||||
const release_id = res.data.id;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user