feat: Include GitHub compare link in the changelog (#48)

* feat: Include GitHub compare link in the changelog

* fix: Full Changelog link markdown position
This commit is contained in:
Ardalan Amini authored and GitHub committed 2022-04-29 10:14:55 +04:30
1 parent 4f2084e0da
commit a4aa721e58
5 files changed
+22 -13

No files matched your search

+10 -6
View File
@@ -30,7 +30,7 @@ async function run() {
if (semver != null) prerelease = semver.prerelease.length > 0;
const tagRef = await getTagSha({
const { sha: tagRef, name: tagName } = await getTagSha({
octokit,
owner,
repo,
@@ -39,7 +39,7 @@ async function run() {
prerelease,
});
const changelog = await generate({
let changelog = await generate({
octokit,
owner,
repo,
@@ -48,13 +48,17 @@ async function run() {
inputs,
});
info(changelog);
if (tagName != null) {
changelog += `\n\n**Full Changelog**: https://github.com/${owner}/${repo}/compare/${tagName}...${inputs.releaseName}`;
}
setOutput("changelog", changelog);
info(`prerelease: ${prerelease}`);
info(`-> prerelease: ${prerelease}`);
setOutput("prerelease", prerelease);
info(`-> changelog: "${changelog}"`);
setOutput("changelog", changelog);
}
run().catch(setFailed);