Skip to content

Commit a4dc055

Browse files
update workflow
1 parent 751c212 commit a4dc055

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

.github/workflows/release.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,16 @@ jobs:
4444
...context.repo,
4545
per_page: 1
4646
});
47-
47+
4848
const previousTag = releases.length > 0 ? releases[0].tag_name : null;
4949
const currentTag = '${{ steps.version.outputs.tag }}';
50-
50+
5151
let compareUrl = '';
5252
let commits = [];
53-
53+
5454
if (previousTag) {
5555
compareUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/compare/${previousTag}...${currentTag}`;
56-
56+
5757
const { data: comparison } = await github.rest.repos.compareCommits({
5858
...context.repo,
5959
base: previousTag,
@@ -67,20 +67,20 @@ jobs:
6767
});
6868
commits = recentCommits;
6969
}
70-
70+
7171
let releaseNotes = `## What's Changed\n\n`;
72-
72+
7373
for (const commit of commits) {
7474
const message = commit.commit.message.split('\n')[0];
7575
const author = commit.author ? commit.author.login : commit.commit.author.name;
7676
const sha = commit.sha.substring(0, 7);
7777
releaseNotes += `* ${message} (${sha}) @${author}\n`;
7878
}
79-
79+
8080
if (previousTag) {
8181
releaseNotes += `\n**Full Changelog**: ${compareUrl}`;
8282
}
83-
83+
8484
return releaseNotes;
8585
8686
- name: Create Release
@@ -92,16 +92,16 @@ jobs:
9292
tag_name: '${{ steps.version.outputs.tag }}',
9393
name: '${{ steps.version.outputs.tag }}',
9494
body: `${{ steps.notes.outputs.result }}`,
95-
make_latest: true
95+
make_latest: 'true'
9696
});
97-
97+
9898
console.log(`Created release: ${release.html_url}`);
9999
100100
- name: Update major version tag
101101
run: |
102102
MAJOR_TAG="v${{ steps.version.outputs.major }}"
103103
echo "Updating major version tag: $MAJOR_TAG"
104-
104+
105105
# Check if major version tag exists
106106
if git ls-remote --tags origin | grep -q "refs/tags/$MAJOR_TAG$"; then
107107
echo "Major version tag $MAJOR_TAG exists, updating it"
@@ -111,4 +111,4 @@ jobs:
111111
echo "Major version tag $MAJOR_TAG does not exist, creating it"
112112
git tag $MAJOR_TAG ${{ steps.version.outputs.tag }}
113113
git push origin $MAJOR_TAG
114-
fi
114+
fi

0 commit comments

Comments
 (0)