Skip to content

Commit

Permalink
fix: ci: discord release message!
Browse files Browse the repository at this point in the history
  • Loading branch information
Panakotta00 committed Oct 28, 2024
1 parent b6a865c commit 4d2bc26
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions .github/workflows/send-discord-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,21 @@ on:
branches:
- development
workflow_dispatch:
inputs:
ping:
type: boolean
default: false
verify-no-draft:
type: boolean
default: false
workflow_call:
inputs:
verify-no-draft:
type: boolean
default: true
ping:
type: boolean
default: true
secrets:
SMR_API_KEY:
required: true
Expand All @@ -31,10 +45,10 @@ jobs:
per_page: 1,
});
const release = response.data[0];
/*if (release.draft) {
if (${{inputs.verify-no-draft}} && release.draft) {
core.setFailed('Found Release is a draft!');
return;
}*/
}
core.setOutput('body', release.body);
core.setOutput('tag_name', release.tag_name);
Expand All @@ -49,8 +63,10 @@ jobs:
let body = process.env.body;
let version = process.env.version;
let split = body.split(/\n(.*)/s);
split.splice(1, 0, `_(${version})_`);
split.push("\n\n<@&1018202499678736446>");
split.splice(1, 0, `_(${version})_\n`);
if (${{inputs.ping}}) {
split.push("\n\n<@&1018202499678736446>");
}
let msg = split.join("");
core.setOutput('msg', msg);
Expand Down

0 comments on commit 4d2bc26

Please sign in to comment.