Skip to content

Commit

Permalink
v4.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Apr 14, 2023
1 parent 11e700b commit a45f9f6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
13 changes: 10 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40711,8 +40711,9 @@ try {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.generateChangelog = void 0;
const changelogen_1 = __nccwpck_require__(7225);
async function generateChangelog(cwd, newVersion) {
async function generateChangelog(cwd, from, newVersion) {
const config = await (0, changelogen_1.loadChangelogConfig)(cwd, {
from,
newVersion,
});
const rawCommits = await (0, changelogen_1.getGitDiff)(config.from, config.to);
Expand Down Expand Up @@ -40773,8 +40774,14 @@ async function run() {
// This removes the 'refs/tags' portion of the string, i.e. from 'refs/tags/v1.10.15' to 'v1.10.15'
const tag = tagName.replace('refs/tags/', '');
const releaseName = core.getInput('release_name', { required: false }) || tag;
console.log('Tag:', tag, 'Release name:', releaseName);
let body = await (0, changelog_js_1.generateChangelog)(process.cwd(), tag.replace(/^v/, ''));
const releases = await github.repos.listReleases({
owner,
repo,
per_page: 1,
});
const previousTag = releases.data[0].tag_name;
console.log(`${previousTag} => ${tag}`);
let body = await (0, changelog_js_1.generateChangelog)(process.cwd(), previousTag, tag.replace(/^v/, ''));
let lines = body.split('\n');
// Cleanup output
const tagFilter = tag.replace('v', '');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "release-tag",
"version": "4.0.6",
"version": "4.0.7",
"description": "",
"main": "dist/index.js",
"author": "Guillaume CHAU",
Expand Down

0 comments on commit a45f9f6

Please sign in to comment.